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: 5s; animation-timing-function: linear; animation-delay: 2s; animation-iteration-count: infini; direction-d'animation: alterné; } @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>CSS Animation</h1> <p>Cet exemple utilise six des propriétés d'animation :</p> <div></div> </body> </html>