Propriété de style animationDelay
Exemple
Modification de la propriété animationDelay d'un élément <div> :
document.getElementById("myDIV").style.animationDelay = "1s";
Définition et utilisation
La propriété animationDelay définit quand l'animation commencera.
La valeur animationDelay est définie en secondes (s) ou en millisecondes (ms).
Astuce : les valeurs négatives sont autorisées, -2s fait démarrer l'animation immédiatement, mais démarre 2 secondes après le début de l'animation.
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 | |||||
---|---|---|---|---|---|
animationDelay | 43.0 | 79.0 | 16.0 5.0 Moz |
9.0 | 30.0 |
Syntaxe
Renvoyez la propriété animationDelay :
object.style.animationDelay
Définissez la propriété animationDelay :
object.style.animationDelay = "time|initial|inherit"
Valeurs de propriété
Value | Description |
---|---|
time | Optional. Defines the number of seconds or milliseconds to wait before the animation will start. Default value is 0 |
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: | 0 |
---|---|
Valeur de retour : | Une chaîne, représentant la propriété animation-delay d'un élément |
Version CSS | CSS3 |
Pages connexes
Référence CSS : propriété animation-delay