From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/fr/web/css/animation-duration/index.html | 110 +++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 files/fr/web/css/animation-duration/index.html (limited to 'files/fr/web/css/animation-duration') diff --git a/files/fr/web/css/animation-duration/index.html b/files/fr/web/css/animation-duration/index.html new file mode 100644 index 0000000000..92edb9d4b5 --- /dev/null +++ b/files/fr/web/css/animation-duration/index.html @@ -0,0 +1,110 @@ +--- +title: animation-duration +slug: Web/CSS/animation-duration +tags: + - CSS + - Propriété + - Reference +translation_of: Web/CSS/animation-duration +--- +
{{CSSRef}}
+ +

La propriété animation-duration définit la durée d'une animation pour parcourir un cycle.

+ +
{{EmbedInteractiveExample("pages/css/animation-duration.html")}}
+ + + +

La valeur par défaut est 0s, ce qui indique qu'aucune animation ne doit avoir lieu.

+ +

Généralement, on passera par la propriété raccourcie {{cssxref("animation")}} afin de définir, en une seule déclaration, les différentes propriétés liées aux animations.

+ +

Syntaxe

+ +
animation-duration: 6s;
+animation-duration: 120ms;
+animation-duration: 1s, 15s;
+animation-duration: 10s, 30s, 230ms;
+
+ +

Valeurs

+ +
+
<time>
+
La durée d'un cycle pour l'animation. Cette valeur peut être indiquée en secondes (s comme suffixe pour l'unité) ou en millisecondes (ms comme suffixe pour l'unité). Si aucune unité n'est définie, la déclaration sera considérée comme invalide.
+
+ +
Note : Les valeurs négatives sont considérées comme invalides. Certaines implémentations, préfixées, considèrent parfois que ces valeurs sont synonymes de 0s.
+ +
Note : Lorsqu'on utiliser plusieurs valeurs, séparées par des virgules, pour une propriété animation-*, selon leur quantité, elles seront différemment affectées aux animations définies par {{cssxref("animation-name")}}. Pour plus d'informations, voir : paramétrer les valeurs des propriétés pour plusieurs animations.
+ +

Syntaxe formelle

+ +
{{csssyntax}}
+ +

Exemples

+ +

CSS

+ +
p {
+  animation-duration: 15s;
+  animation-name: glissement;
+  animation-iteration-count: infinite;
+}
+@keyframes glissement {
+  from {
+    margin-left: 100%;
+    width: 300%;
+  }
+
+  to {
+    margin-left: 0%;
+    width: 100%;
+  }
+}
+ +

HTML

+ +
<p>
+  La Chenille et Alice se considérèrent un instant en silence.
+  Enfin la Chenille sortit le houka de sa bouche, et lui adressa
+  la parole d’une voix endormie et traînante.
+</p> 
+ +

Résultat

+ +

{{EmbedLiveSample("Exemples","300","200")}}

+ +

Spécifications

+ + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('CSS3 Animations', '#animation-duration', 'animation-duration')}}{{Spec2('CSS3 Animations')}}Définition initiale.
+ +

{{cssinfo}}

+ +

Compatibilité des navigateurs

+ + + +

{{Compat("css.properties.animation-duration")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf