visionmedia / move.js

CSS3 backed JavaScript animation framework
http://visionmedia.github.com/move.js/
4.72k stars 686 forks source link

How to loop an animation #68

Open freew01f opened 9 years ago

freew01f commented 9 years ago

I want loop play a animation, how to do it? thanks

zhaoyunyes commented 7 years ago

function loopTransition() { move('#box1').set("transform", "translate3d(80px,20px,0)").duration(2000).end(function() { move('#box1').set("transform", "").duration(1000).end(function() { loopTransition(); }); }); } loopTransition();

Maybe it's not the best way to do it,but it's also a way