HTML

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Animated loader</title>
</head>
<body>
  <div id="loader"></div>
</body>
</html>

CSS

body {
        display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}
#loader {
  height:100px;
  width:100px;
  background-: red;
  border-radius:50%;
  border:5px solid #ddd;
  border-top-color: #333;
  animation: rotate 1s infinite;
}
@keyframes rotate {
  100% {
    rotate:360deg;
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.