Jac*_*coe 3 javascript html5 svg raphael
我正在使用Raphael库来创建SVG对象.
要初始化SVG形状并为内部的所有内容创建画布,我使用了文档中所述的以下行:
var paper = Raphael(10, 50, 320, 200);
Run Code Online (Sandbox Code Playgroud)
我现在想要对纸张及其内部的所有内容进行动画制作,就像我将动画一个已经附加到纸张上的形状一样:
var firstShape = paper.rect(x, y, width, height);
firstShape.animate({x: 100}, 500, "<");
Run Code Online (Sandbox Code Playgroud)
当我尝试与纸张类似的东西时,例如:
paper.animate({x: 100}, 500, "<");
Run Code Online (Sandbox Code Playgroud)
我收到错误' paper.animate is not a function'.
这里发生了什么,我该如何解决它?
| 归档时间: |
|
| 查看次数: |
2113 次 |
| 最近记录: |