Exécuter
❯
Exécuter le code
Ctrl+Alt+R
Enregistrer le code
Ctrl+Alt+A
Changer d'orientation
Ctrl+Alt+O
Changer de thème
Ctrl+Alt+D
<!DOCTYPE html> <html> <head> <style> div { largeur: 100px; hauteur: 100px; couleur-de-fond: rouge; position: relative; animation-name: myAnimation; animation-duration: 4s; animation-iteration-count: 3; } @keyframes myAnimation { 0% {background-color:rouge; left:0px; top:0px;} 25% {background-color:jaune; left:200px; top:0px;} 50% {background-color:blue; left:200px; top:200px;} 75% {background-color:green; left:0px; top:200px;} 100% {background-color:rouge; left:0px; top:0px;} } </style> </head> <body> <h1>Propriété CSS animation-iteration-count</h1> <p>La propriété animation-iteration-count spécifie le nombre de fois qu'une animation doit s'exécuter. L'exemple suivant exécutera l'animation 3 fois avant de s'arrêter :</p> <div></div> </body> </html>