Dots Loader

In this example below you will see how to do a Dots Loader with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by Symsym, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright Symsym ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Dots Loader</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div class="all">
  <div class="dot1"></div>
  <div class="dot2"></div>
  <div class="dot3"></div>
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/Symsym/dots-loader-pcrkh */
body {
  background: #252525;
  margin: 0;
}
.all {
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}
.dot1 {
  width: 100px;
  height: 100px;
  background: #fff;
  border-radius: 50%;
  position: relative;
  top: 0;
  left: 0;
  -webkit-animation: dot1 2s ease-in-out infinite;
          animation: dot1 2s ease-in-out infinite;
}
.dot2 {
  width: 100px;
  height: 100px;
  background: #fff;
  border-radius: 50%;
  position: relative;
  top: 100px;
  left: 100px;
  -webkit-animation: dot2 2s ease-in-out infinite;
          animation: dot2 2s ease-in-out infinite;
}
.dot3 {
  width: 100px;
  height: 100px;
  background: #fff;
  border-radius: 50%;
  position: relative;
  top: 0;
  left: -100px;
  -webkit-animation: dot3 2s ease-in-out infinite;
          animation: dot3 2s ease-in-out infinite;
}
@-webkit-keyframes dot1 {
  from {
    left: 0;
    top: 0;
  }
  33.333333333% {
    left: -100px;
    top: 200px;
  }
  66.666666666% {
    left: 100px;
    top: 200px;
  }
}
@keyframes dot1 {
  from {
    left: 0;
    top: 0;
  }
  33.333333333% {
    left: -100px;
    top: 200px;
  }
  66.666666666% {
    left: 100px;
    top: 200px;
  }
}
@-webkit-keyframes dot2 {
  from {
    left: 100px;
    top: 100px;
  }
  33.333333333% {
    left: 0px;
    top: -100px;
  }
  66.666666666% {
    left: -100px;
    top: 100px;
  }
}
@keyframes dot2 {
  from {
    left: 100px;
    top: 100px;
  }
  33.333333333% {
    left: 0px;
    top: -100px;
  }
  66.666666666% {
    left: -100px;
    top: 100px;
  }
}
@-webkit-keyframes dot1 {
  from {
    left: 0;
    top: 0;
  }
  33.333333333% {
    left: -100px;
    top: 200px;
  }
  66.666666666% {
    left: 100px;
    top: 200px;
  }
}
@keyframes dot1 {
  from {
    left: 0;
    top: 0;
  }
  33.333333333% {
    left: -100px;
    top: 200px;
  }
  66.666666666% {
    left: 100px;
    top: 200px;
  }
}
@-webkit-keyframes dot3 {
  from {
    left: -100px;
    top: 0px;
  }
  33.333333333% {
    left: 100px;
    top: 0px;
  }
  66.666666666% {
    left: 0px;
    top: -200px;
  }
}
@keyframes dot3 {
  from {
    left: -100px;
    top: 0px;
  }
  33.333333333% {
    left: 100px;
    top: 0px;
  }
  66.666666666% {
    left: 0px;
    top: -200px;
  }
}

Comments