Propriété CSS animation-iteration-count
Exemple
Jouez l'animation deux fois :
div {
animation-iteration-count: 2;
}
Plus d'exemples "Essayez-le vous-même" ci-dessous.
Définition et utilisation
La animation-iteration-count
propriété spécifie le nombre de fois qu'une animation doit être lue.
Valeur par défaut: | 1 |
---|---|
Hérité: | non |
Animable : | non. En savoir plus sur l'animation |
Version: | CSS3 |
Syntaxe JavaScript : | objet .style.animationIterationCount="infini" |
Prise en charge du navigateur
Les nombres dans le tableau indiquent la première version du navigateur qui prend entièrement en charge la propriété.
Les nombres suivis de -webkit-, -moz- ou -o- spécifient la première version qui a fonctionné avec un préfixe.
Property | |||||
---|---|---|---|---|---|
animation-iteration-count | 43.0 4.0 -webkit- |
10.0 | 16.0 5.0 -moz- |
9.0 4.0 -webkit- |
30.0 15.0 -webkit- 12.0 -o- |
Syntaxe CSS
animation-iteration-count: number|infinite|initial|inherit;
Valeurs de propriété
Value | Description | Play it |
---|---|---|
number | A number that defines how many times an animation should be played. Default value is 1 | |
infinite | Specifies that the animation should be played infinite times (for ever) | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Plus d'exemples
Exemple
Jouez l'animation pour toujours :
div {
animation-iteration-count: infinite;
}
Pages connexes
Tutoriel CSS : Animations CSS
Référence HTML DOM : propriété animationIterationCount