我正在使用bodyworks和lottie加载自定义SVG动画,由于某种原因,它引发GET错误。该文件的路径是正确的,因为当我将其复制并粘贴到浏览器中时,它可以很好地加载,因此我不确定出什么问题了?
var animation = bodymovin.loadAnimation({
container: document.getElementById("animationContainer"),// the dom element that will contain the animation
renderer: 'svg',loop: true,autoplay: true,path: 'data.json' // the path to the animation json
});
该文件最初位于嵌套文件夹中,但我认为这可能是某些错误的原因,因此我将其移动了,但是仍然无法加载。任何帮助将不胜感激
> bodymovin.js:1300 GET file:///G:/My%20Drive/YetiTech/YetiTechNewSite/YetiTech/The%20Fresh%20Site%20of%20Bel%20Air/data.jsonnet::ERR_FAILED