Colorful Spinner Animation
HTML CODE:-
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title></title> </head> <body> <div class="container"></div> </body> </html> |
CSS CODE:-
body{ padding: 0px; margin: 0px; display: flex; align-items: center; justify-content: center; min-height: 100vh; background: black; } .container{ position: absolute; width: 150px; height: 150px; border: 5px solid transparent; border-bottom: 5px solid #f2709c; border-top: 5px solid #4b6cb7; border-radius: 50%; animation: animate 2s linear infinite; } .container::before{ content: ""; position: absolute; inset: 10px; border: 5px solid transparent; border-bottom: 5px solid #dae2f8; border-top: 5px solid #24c6dc; border-radius: 50%; animation: animate 2s linear infinite; } .container::after{ content: ""; position: absolute; inset: 25px; border: 5px solid transparent; border-bottom: 5px solid #ed4264; border-top: 5px solid #F7BB97; border-radius: 50%; animation: animate 5s linear infinite; } @keyframes animate{ 0%{ transform: rotate(0deg); } 100%{ transform: rotate(360deg); } } |