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; arrière-plan: rouge; position: relative; animation-name: myAnimation; animation-duration: 3s; animation-delay: 2s; animation-fill-mode: both; } @keyframes myAnimation { from {top: 0px; background-color: yellow;} à {top: 200px; background-color: blue;} } </style> </head> <body> <h1>Propriété animation-fill-mode CSS</h1> <p>Laissez l'élément div obtenir les valeurs de style définies par le premier keyframe avant le début de l'animation, et conserver les valeurs de style du dernier keyframe lorsque l'animation se termine :</p> <div></div> </body> </html>