animation-iteration-count

« CSS « CSS Reference

This is an experimental feature
Because this feature is still in development in some browsers, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental feature is subject to change in future version of browsers as the spec changes.

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.

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

  • Desktop
  • Mobile

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 ? ? ? ? ?

Tags (4)

Edit tags

Attachments (0)

 

Attach file