The animation-iteration-count property specifies the number of times an animation cycle is played. The initial value is '1', meaning the animation will play from beginning to end once. A value of 'infinite' will cause the animation to repeat forever.

  • Initial value1
  • Applies toAll elements, :before and :after pseudo elements
  • InheritedNo
  • MediaVisual
  • Computed valueAs specified
  • AnimatableNo
  • CSS VersionCSS3
  • JavaScript syntaxobject.style.animationIterationCount
Formal syntax: <single-animation-iteration-count> [ ',&' <single-animation-iteration-count> ]*

animation-iteration-count: [value];
<single-animation-iteration-count> = infinite | <number>
  • infiniteThe animation will repeat forever.
  • <number>The number of times the animation should repeat; this is 1 by default. Negative values are invalid. You may specify non-integer values to play part of an animation cycle (for example 0.5 will play half of the animation cycle).
.class {
   animation-iteration-count: 4;
}
?Firefox?Explorer?Chrome?Safari?Opera


Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.