Style animationDirection propriété
Exemple
Modification de la propriété animationDirection d'un élément <div> :
document.getElementById("myDIV").style.animationDirection = "reverse";
Définition et utilisation
La propriété animationDirection définit ou renvoie si l'animation doit ou non être lue en sens inverse sur des cycles alternés.
Remarque : Si l'animation est définie pour être lue une seule fois, cette propriété n'aura aucun effet.
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 Moz spécifient la première version qui a fonctionné avec un préfixe.
Property | |||||
---|---|---|---|---|---|
animationDirection | 43.0 | 79.0 | 16.0 5.0 Moz |
9.0 | 30.0 |
Syntaxe
Renvoyez la propriété animationDirection :
object.style.animationDirection
Définissez la propriété animationDirection :
object.style.animationDirection = "normal|reverse|alternate|alternate-reverse|initial|inherit"
Valeurs de propriété
Value | Description |
---|---|
normal | Default value. The animation should be played as normal |
reverse | The animation should play in reverse direction |
alternate | The animation will be played as normal every odd time (1,3,5,etc..) and in reverse direction every even time (2,4,6,etc...) |
alternate-reverse | The animation will be played in reverse direction every odd time (1,3,5,etc..) and in a normal direction every even time (2,4,6,etc...) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Détails techniques
Valeur par défaut: | Ordinaire |
---|---|
Valeur de retour : | Une chaîne, représentant la propriété animation-direction d'un élément |
Version CSS | CSS3 |
Pages connexes
Référence CSS : propriété animation-direction