CSS Property animation-iteration-count

The associate degreeimation-iteration-count property is employed to specify the quantity of times that an animation cycle is compete before the animation stops.

The initial worth is ‘1’, which means the animation can play from commencing to finish once.

This property is commonly employed in conjunction with associate degree animation-direction worth of alternate, which is able to cause the animation to play in reverse on alternate cycles. See the live demo section below for a live demo.

You can specify one iteration count or multiple comma-separated iteration counts. once you give a listing of comma-separated iteration counts, this list is typically mapped to a listing of values provided by alternative animation-related properties, like the animation-delay, animation-timing-function, and animation-name properties, among others. every list of values in these properties is treated reasonably like associate degree array, wherever every worth in an exceedingly list of values has its own index. Then, every worth in an exceedingly list of worths is mapped to its corresponding value with an equivalent index within the list provided within the alternative properties.

For example, if you give 2 animation-iteration-count values, then the primary worth determines the iteration count of the animation of the primary animation within the list of animation names provided by animation-name, and also the second iteration count specifies the iteration count of the second animation.

The animation-iteration-count property is typically set as a part of the animation property shorthand.

Examples

.class{
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: linear;
}

Desktop Browser Support

Mobile Browser Support

One comment

  1. Hey very cool website!! Man .. Beautiful .. Amazing .. I will bookmark your website and take the feeds also…I’m happy to find a lot of useful information here in the post, we need work out more strategies in this regard, thanks for sharing. . . . . .

Leave a Reply