Raphael.js - 随时间缩放元素 [英] Raphael.js - scale an element over time
本文介绍了Raphael.js - 随时间缩放元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
刚开始使用 Raphael.js
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.
推荐答案
假设你的圈子是这样创建的:
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.
这篇关于Raphael.js - 随时间缩放元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文