Raphael.js - scale an element over time

泄露秘密 提交于 2019-12-24 19:51:14

问题


Very new to using Raphael.js

I'm looking at the tutorials and I am able to create a circle.

But how would I scale the circle to double the size over two seconds.


回答1:


Assuming your circle is created like:

var circle = paper.circle(50, 40, 10);

You can scale it up over two seconds like:

circle.animate({
    transform: 's2'
}, 2000, 'easeIn');

You could also just double its radius if it is fixed.



来源:https://stackoverflow.com/questions/9866684/raphael-js-scale-an-element-over-time

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!