+ 3
How to stop animation in specific time?
Please tell me anyone!
2 Réponses
+ 11
If you want your animation to stop after some time , you can use:
animation-iteration-count:K;
The animation will stop after reaching 100% for the K time.
But instead of K , write the number you want.
+ 2
You can also use setInterval(function, time). It takes 2 arguments. A function to call and how often to call it (in 'ms'). For ex:
var myInterval = setInterval (func, 1000);
That code will run 'func' every second. To stop it just use clearInterval():
clearInterval(myInterval);