Table of contents
- 1. Summary
- 2. Syntax
- 2.1. Values
- 3. Examples
- 4. Specifications
- 5. Browser compatibility
- 6. See also
« CSS « CSS Reference
Summary
The animation-iteration-count CSS property defines the number of times an animation cycle should be played before stopping.
It is often convenient to use the shorthand property animation
to set all animation properties at once.
- Initial value
:
1 - Applies to: all elements, and
::beforeand::afterpseudo-elements - Inherited : no
- Media:
visual - Computed value : as specified
Syntax
animation-iteration-count: infinite | <number> [, infinite | <number>]*
Values
infinite- The animation will repeat forever.
<number>- The number of times the animation should repeat; this is 1 by default. Negative values are treated like 0. You may specify non-integer values to play part of an animation cycle (for example 0.5 will play half of the animation cycle).
Examples
See CSS animations for examples.
Specifications
| Specification | Status | Comment |
|---|---|---|
| CSS Animations Level 3 | Working Draft |
Browser compatibility
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | (Yes) -webkit | 5.0 (5.0) -moz | 10 -ms [1] | 12 -o | 4.0 -webkit |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | ? | ? | ? | ? | ? |
Mozilla Developer Network