CSS3 animation-iteration-count Property
Example
Play the animation three times:
animation-iteration-count:3;
-webkit-animation-iteration-count:3; /Safari and Chrome/
Try it »
Browser support
The numbers in the table indicate the first browser version that supports this property.
A number immediately before -webkit-, -ms-, or -moz- indicates the first browser version that supports that prefixed property.
| property | |||||
|---|---|---|---|---|---|
| animation-iteration-count | 43.0 | ||||
| 4.0 -webkit- | 10.0 | 16.0 | |||
| 5.0 -moz- | 9.0 | ||||
| 4.0 -webkit- | 30.0 |
15.0 -webkit-
12.0 -o- |
Tag Definition and Usage Notes
The animation-iteration-count property defines how many times an animation should be played.
| Default value: | 1 |
|---|---|
| Inherited: | no |
| Version: | CSS3 |
| JavaScript syntax: | object object.style.animationIterationCount=3 |
Syntax
animation-iteration-count:
value
;
| Value | Description | Testing |
|---|---|---|
| n | A number that defines how many times the animation should be played | Test » |
| infinite | Specifies that the animation should be played an infinite number of times (forever) | Test » |
Related Articles
CSS3 tutorial: CSS3 Animations