O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

animation-iteration-count

Values:

infinite | <number> [, infinite | <number>]*

Initial value:

1

Applies to:

Block-level and inline-level elements

Inherited:

No

Computed value:

Same as declared value

Description:

Defines the number of cycles in the animation(s). The initial value, 1, means that the animation will run exactly once, going from the start state to the end state. A fractional value (e.g., 2.75) means the animation will be halted midway through its final cycle. A value of 0 means that there will be no animation; negative values are converted to 0. As its name implies, infinite means the animation will never end. Use with caution.

Examples:

body {animation-iteration-count: 2, 1, 7.5875;}
ol.dance {animation-iteration-count: infinite;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required