The animation-iteration-count property sets how many times an animation cycle plays before it stops. The initial value is 1. Use a number for a fixed count, or infinite to keep repeating.
Non-integer numbers play a partial cycle. For example, 1.5 runs one full play, then half of the next. You still need an animation-name and an animation-duration. It applies to all elements, including ::before and ::after, and it is not inherited. A count does not remove motion for someone who set prefers-reduced-motion.
Standard-track.
Not deprecated and not experimental. Numbers and infinite have been widely available since 2015.
The initial value is 1. Zero or a positive number is allowed. Negative numbers are invalid. For several animations, separate the counts with commas, in the same order as the names.
animation: 1s fade sets this property back to 1. Write animation-iteration-count after it, or include the number or infinite in the shorthand.
list
One count per animation name
animation-iteration-count: 2, infinite follows the order of animation-name. Fewer counts than names, and the list repeats.
Compatibility
Browser Support
animation-iteration-count is a browser style property. Node.js, Deno, and Bun do not play it. The versions below include numbers and infinite.
✓ Baseline · Widely available since 2015
animation-iteration-count
Chrome 43+, Firefox 16+, Safari 9+, Edge 12+, Internet Explorer 10+. Integer counts, fractions, and infinite share these versions.
97%numbers and infinite
Google Chrome43+
Full support
Mozilla Firefox16+
Full support
Apple Safari9+
Full support
Microsoft Edge12+
Full support
Opera30+
Full support
Samsung Internet4+
Full support
Internet Explorer10+
Full support
animation-iteration-countWidely supported
Bottom line: Older Chrome, Safari, and Firefox also accepted a prefixed property. Fractional counts and infinite shipped with CSS animations.
Remember
Key Takeaways
Role: how many times one animation cycle plays.
1: the initial value. One play, then stop.
infinite: never stops. Useful for loaders and loops.
Fractions:1.5 plays one full cycle, then half of the next.
One line: set a name and a duration, then animation-iteration-count decides how many cycles run.
Frequently Asked Questions
It sets how many times an animation cycle plays before stopping. 1 plays once. 2 plays twice. infinite keeps repeating.
The initial value is 1. The animation plays one cycle unless you set another number or infinite.
Yes. Non-integer values play a partial cycle. 1.5 means one full play, then half of the next play, then it stops.
The animation repeats forever until the style is removed or the page changes. It never reaches a finished after state for animation-fill-mode: forwards.
No. Negative numbers are invalid and the declaration is ignored. Use 0 or a positive number, or infinite.
Chrome 43+, Firefox 16+, Safari 9+, Edge 12+, and Internet Explorer 10 support numbers and infinite. It is a browser style property, not a Node.js feature.