From 149319bb8c7b1394a443f0877c3460cd362aa815 Mon Sep 17 00:00:00 2001 From: julieng Date: Fri, 17 Sep 2021 20:58:15 +0200 Subject: move *.html to *.md --- files/fr/web/css/animation-play-state/index.md | 128 +++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 files/fr/web/css/animation-play-state/index.md (limited to 'files/fr/web/css/animation-play-state/index.md') diff --git a/files/fr/web/css/animation-play-state/index.md b/files/fr/web/css/animation-play-state/index.md new file mode 100644 index 0000000000..c0dcf45efb --- /dev/null +++ b/files/fr/web/css/animation-play-state/index.md @@ -0,0 +1,128 @@ +--- +title: animation-play-state +slug: Web/CSS/animation-play-state +tags: + - CSS + - Propriété + - Reference +translation_of: Web/CSS/animation-play-state +--- +
{{CSSRef}}
+ +

La propriété animation-play-state définit si une animation est en cours d'exécution ou si elle est en pause.

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

Lorsqu'on reprend une animation en pause, celle-ci reprendra où elle avait été interrompue (elle ne recommencera pas depuis le début de la séquence).

+ +

Syntaxe

+ +
/* On a une seule animation */
+animation-play-state: running;
+animation-play-state: paused;
+
+/* On gère plusieurs animations */
+/* avec des valeurs respectives */
+animation-play-state: paused, running, running;
+
+/* Valeurs globales */
+animation-play-state: inherit;
+animation-play-state: initial;
+animation-play-state: unset;
+
+ +

Valeurs

+ +
+
running
+
L'animation est en cours.
+
paused
+
L'animation est en pause.
+
+ +
+

Note : Lorsqu'on utilise plusieurs valeurs, séparées par des virgules, pour une propriété animation-*, elles seront respectivement 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: 3s;
+  animation-name: glissement;
+  animation-iteration-count: infinite;
+}
+
+.arret {
+  animation-play-state: paused;
+}
+
+.encours {
+  animation-play-state: running;
+}
+
+@keyframes glissement {
+  from {
+    margin-left: 100%;
+    width: 200%;
+  }
+
+  to {
+    margin-left: 0%;
+    width: 100%;
+  }
+}
+ +

HTML

+ +
<p class="arret">
+  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>
+
+<p class="encours">
+  Alice, un peu irritée du parler bref de la Chenille, se redressa
+  de toute sa hauteur.
+</p> 
+ +

Résultat

+ +

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

+ +

Spécifications

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

{{cssinfo}}

+ +

Compatibilité des navigateurs

+ +

{{Compat("css.properties.animation-play-state")}}

+ +

Voir aussi

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