Loading…
Everything will be ready in few seconds
- Theory
- Theory
- Comments
Animation play count: animation-iteration-count
In all our previous examples, we created animations that were only played once, then the element was restored to the original state. We can explicitly specify how many times an animation will be played. To do this, use the animation-iteration-count
property.
It accepts positive integers or zero as input parameters: if the value is zero, the animation will not be played; in all other cases, it will be played the specified number of times.
You can also use the word infinite
as a value of the animation-iteration-count
parameter. It means that the animation will be played an infinite number of times and will never stop.
Let’s try setting different values to this parameter.
- index.html
- style.css
Thanks! We’ll fix everything at once!
The code has changed, click “Refresh” or turn autorun on.
You’ve gone to a different page
Click inside the mini-browser to shift the focus onto this window.
Comments