Exécuter
❯
Exécuter le code
Ctrl+Alt+R
Sauvegarder 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; } @keyframes myAnimation { 0% {background-color:red; 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>CSS Animation</h1> <div></div> <p><b>Remarque :</b>Lorsque l'animation est terminée, elle revient à son style d'origine.</p> </body> </html>