这就是我要做的
http://jsfiddle.net/lono1981/CvMEX/2/
var paper = Raphael("paper");
var gear1 = paper.image( "https://dl.dropboxusercontent.com/u/55552239/Testing%20Stuff/gear1.png",20,20,171,171,171);
var gear2 = paper.image( "https://dl.dropboxusercontent.com/u/55552239/Testing%20Stuff/gear2.png",175,30,43,43,43);
var gear3 = paper.image( "https://dl.dropboxusercontent.com/u/55552239/Testing%20Stuff/gear3.png",190,70,84,84,84);
var anim1 = Raphael.animation({transform: "r360"}, 4000).repeat(Infinity);
gear1.animate(anim1);
var anim2 = Raphael.animation({transform: "r-360"}, 3500).repeat(Infinity);
gear2.animate(anim2);
var anim3 = Raphael.animation({transform: "r-360"}, 3500).repeat(Infinity);
gear3.animate(anim3);
var f_in = function() {
gear1.stop();
};
var f_out = function() {
gear1.animate(anim1);
};
gear1.hover (f_in,f_out);
基本上,一旦悬停停止并重新启动动画,动画就会减慢并且不能正确重复。
我究竟做错了什么?