Fancy Loader

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

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

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

  
</head>

<body>

  <div class="loader">
  <span class='dot'></span>
  <span class='dot'></span>
  <span class='dot'></span>
  <div class='msg'>loading</div>
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/chrismbarr/fancy-loader-YPqwBr */
body {
  background: #F5F5F5;
}

.loader {
  margin: 100px auto 0;
  width: 70px;
  text-align: center;
  background: #EEE;
  padding: 10px 3px 3px 3px;
  border-radius: 4px;
  border: 1px solid #CCC;
}
.loader .msg {
  color: #666;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.428571429;
  -webkit-animation: loadFade 1.4s infinite ease-in-out;
  animation: loadFade 1.4s infinite ease-in-out;
}
.loader .dot {
  width: 18px;
  height: 18px;
  background-color: #009688;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
  -webkit-animation: bouncedelay 1.4s infinite ease-in-out;
  animation: bouncedelay 1.4s infinite ease-in-out;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}
.loader .dot:nth-child(1) {
  -webkit-animation-delay: -0.32s;
  animation-delay: -0.32s;
}
.loader .dot:nth-child(2) {
  -webkit-animation-delay: -0.16s;
  animation-delay: -0.16s;
}

@-webkit-keyframes loadFade {
  0%, 80%, 100% {
    opacity: 0.6;
  }
  40% {
    opacity: 1;
  }
}
@keyframes loadFade {
  0%, 80%, 100% {
    opacity: 0.6;
  }
  40% {
    opacity: 1;
  }
}
@-webkit-keyframes bouncedelay {
  0%, 80%, 100% {
    -webkit-transform: scale(0);
  }
  40% {
    -webkit-transform: scale(1);
  }
}
@keyframes bouncedelay {
  0%, 80%, 100% {
    transform: scale(0);
    -webkit-transform: scale(0);
  }
  40% {
    transform: scale(1);
    -webkit-transform: scale(1);
  }
}

Comments