使用Raphael.animate方法来添加过渡动画效果
//过渡动画
var anim3 = Raphael.animation({
"0%":{
stroke: "#FF83FA"
},
"10%":{
stroke: "#FF7F24"
},
"20%":{
stroke: "#FF83FA"
},
"30%":{
stroke: "#FF7F24"
},
"40%":{
stroke: "#B03060"
},
"50%":{
stroke: "#FF7F24"
},
"60%":{
stroke: "#B4EEB4"
},
"70%":{
stroke: "#B03060"
},
"80%":{
stroke: "#B22222"
},
"90%":{
stroke: "#FF7F24"
},
"100%":{
stroke: "#FF83FA"
}
},5000)
//这里的5000为动画总执行时间
//添加给你的对象
textoo.animate(anim3.repeat(1))