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-delay: 2s; } @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>Propriété animation-delay CSS</h1> <p>La propriété animation-delay spécifie un délai pour le début d'une animation. L'exemple suivant a un délai de 2 secondes avant de commencer l'animation :</p> <div></div> </body> </html>