看起来 jQueryRotate 插件中的默认缓动不是线性的。图像在旋转结束时会减速。所以如果我使用递归函数图像不会均匀旋转。
例子:
这是代码:
HTML:
<div id="rotate_me" style="border: 1px solid red; width: 100px; height: 100px"></div>
JS:
var rotation = function (){
jQuery("#rotate_me").rotate({
angle: 0,
animateTo:360,
duration: 1600,
callback: rotation
});
}
rotation();