实现一个运动框架的速度及时间版

网友投稿 480 2022-10-28

实现一个运动框架的速度及时间版

实现一个运动框架的速度及时间版

Animate

animate.js is a simple library that helps you write smooth motion effects

Usage

npm install poetriesanimate

Include animate.min.js in your page:

or

Take Animate for example

animateSpeed version usage method:

animateSpeed(obj,json,callback);

example:

animateSpeed(obj,{ "left":500, "width":200, "height":300, "opacity":100},function(){ //callback this.innerHTML = "我是速度版本";});

animateTime version usage method:

animateTime(obj,json,time,prop,callback);

example:

animateTime(obj,{ "left":500, "opacity":100},1000,"elasticOut",function(){ //callback this.innerHTML = "我是时间版本";});

animatable properties

obj 要运动的元素对象json 传入多个属性time 需要动画变换的时间callback 回调函数prop 运动的特效函数 linear 匀速easeIn 加速曲线easeOut 减速曲线easeBoth 加加速曲线easeInStrong 减减速曲线easeOutStrong 加加速减减速曲线elasticIn 正弦衰减曲线 (弹动渐入)elasticOut 正弦增强曲线 (弹动渐出)elasticBothbackIn 回退加速 (回退渐入)backOut 回缩的距离backBothbounceIn 弹球减振(弹球渐出)bounceOutbounceBoth

Demo and Application examp

demo01demo02运用速度版animateSpeed实现banner轮播

License

© 2017 A poetries's ideas.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:使用scrapy框架爬取一些医疗疾病数据
下一篇:使用SpringMVC接收文件流上传和表单参数
相关文章

 发表评论

暂时没有评论,来抢沙发吧~