Tobelight Text Animation

Tobelight Text Animation code:

1.index.html:

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Tobelight Text Animation</title> <link rel="stylesheet" href="style.css"> </head> <body> <ul> <li>S</li> <li>M</li> <li>T</li> <li>P</li> <li>5</li> <li>8</li> <li>7</li> </ul> </body> </html>

2.style.css:

body { margin: 0; padding: 0; background: black; } ul { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); margin: 0; padding: 0; display: flex; } ul li { list-style: none; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 5em; letter-spacing: 15px; color: pink; text-shadow: none; animation: animate 1s infinite linear; } @keyframes animate { 0% { color: yellow; text-shadow: none; } 20% { color: rgb(255, 94, 0); text-shadow: none; } 30% { color: rgb(0, 255, 38); text-shadow: none; } 40% { color: rgb(0, 255, 221); text-shadow: none; } 60% { color: rgb(81, 0, 255); text-shadow: none; } 80% { color: rgb(255, 0, 179); text-shadow: none; } 100% { color: rgb(255, 0, 0); text-shadow: none; } } ul li:nth-child(1) { animation-delay: 0.2s; } ul li:nth-child(2) { animation-delay: 0.4s; } ul li:nth-child(3) { animation-delay: 0.6s; } ul li:nth-child(4) { animation-delay: 0.8s; } ul li:nth-child(5) { animation-delay: 1s; } ul li:nth-child(6) { animation-delay: 1.2s; } ul li:nth-child(7) { animation-delay: 1.4s; }

Оставьте комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *