Loading Animation
HTML CODE:-
<!DOCTYPE HTML> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> </head> <body> <div class="container"> <h1>Loading</h1> <span class="dot"></span> <span class="dot"></span> <span class="dot"></span> <span class="dot"></span> </div> </body> </html> |
CSS CODE:-
body{ padding: 0px; margin: 0px; box-sizing: border-box; } .container{ width: 100%; height: 100vh; background-color: black; display: flex; align-items: center; justify-content: center; gap: 10px; } .container h1{ color: white; } .container .dot{ width: 10px; height: 10px; background-color: white; border-radius: 10px; animation: animate 1s alternate infinite; } @keyframes animate{ from{ height: 0; } to{ height: 25px; } } .container .dot:nth-child(1){ animation-delay: 0.2s; } .container .dot:nth-child(2){ animation-delay: 0.4s; } .container .dot:nth-child(3){ animation-delay: 0.6s; } .container .dot:nth-child(4){ animation-delay: 0.8s; } |