Loading Animation

Loading Animation code:

1.index.html:

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Loading Animation</title> <link rel="stylesheet" href="style.css"> </head> <body> <ul> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> </body> </html>

2.style.css:

body { margin: 0; padding: 0; } ul { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: flex; } ul li { list-style: none; width: 6px; height: 20px; background: black; margin: 0 4px; animation: animate 0.7s infinite alternate; } @keyframes animate { 0% { transform: scaleY(1); } 25% { transform: scaleY(1); } 50% { transform: scaleY(1); } 75% { transform: scaleY(1); } 100% { transform: scaleY(3); } } ul li:nth-child(1) { animation-delay: 0.1s; } ul li:nth-child(2) { animation-delay: 0.2s; } ul li:nth-child(3) { animation-delay: 0.3s; } ul li:nth-child(4) { animation-delay: 0.4s; } ul li:nth-child(5) { animation-delay: 0.5s; } ul li:nth-child(6) { animation-delay: 0.6s; } ul li:nth-child(7) { animation-delay: 0.7s; }

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

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