Propriété CSS transition-duration
Exemple
Laissez l'effet de transition durer 5 secondes :
div {
transition-duration: 5s;
}
Définition et utilisation
La transition-duration
propriété spécifie le nombre de secondes (s) ou de millisecondes (ms) nécessaires à l'exécution d'un effet de transition.
Valeur par défaut: | 0s |
---|---|
Hérité: | non |
Animable : | non. En savoir plus sur l'animation |
Version: | CSS3 |
Syntaxe JavaScript : | objet .style.transitionDuration="1s" |
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 | |||||
---|---|---|---|---|---|
transition-duration | 26.0 4.0 -webkit- |
10.0 | 16.0 4.0 -moz- |
6.1 3.1 -webkit- |
12.1 10.5 -o- |
Syntaxe CSS
transition-duration: time|initial|inherit;
Valeurs de propriété
Value | Description |
---|---|
time | Specifies how many seconds or milliseconds a transition effect takes to complete. Default value is 0s, meaning there will be no effect |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Pages connexes
Tutoriel CSS : Transitions CSS
Référence HTML DOM : propriété transitionDuration