美文网首页
Raphael.animate方法

Raphael.animate方法

作者: LElysion | 来源:发表于2017-05-06 18:05 被阅读0次

使用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))

相关文章

网友评论

      本文标题:Raphael.animate方法

      本文链接:https://www.haomeiwen.com/subject/mlhytxtx.html