【发布时间】:2015-06-14 06:07:33
【问题描述】:
HTML 代码
<div>
<img id="in" width="300px">
</div>
JavaScript 代码
var image = document.getElementById("in");
image.src = "http://upload.wikimedia.org/wikipedia/commons/5/51/Google.png";
image.animate({marginTop: "100vh"});
每次我运行这个程序时,我都能加载图像,但我无法在其上执行动画。我收到此错误:
Uncaught TypeError: Failed to execute 'animate' on 'Element': No function was found that matched the signature provided.
我应该怎么做才能解决这个问题?
提前致谢!
【问题讨论】:
标签: javascript jquery html image animation