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> @property --startColor { syntax: "<color>"; valeur-initiale: #EADEDB; hérite: faux; } @property --endColor { syntax: "<color>"; valeur-initiale: #BC70A4; hérite: faux; } .ex1 { arrière-plan: dégradé-linéaire(var(--startColor), var(--endColor)); animation: gradient 3s linear infinite; } @keyframes gradient { 0%, 100% { --startColor: #EADEDB; --endColor: #BC70A4; } 50% { --startColor: #BC70A4; --endColor: #BFD641; } } #grad1 { hauteur: 200px; } </style> </head> <body> <h1>La règle @property</h1> <p>La règle @property est ici utilisée pour animer un dégradé :</p> <div id="grad1" class="ex1"></div> </body> </html>