Mixed spinner #1

In this example below you will see how to do a Mixed spinner #1 with some HTML / CSS and Javascript

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

<head>
  <meta charset="UTF-8">
  <title>Mixed spinner #1</title>
  
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">

  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  
<div class="wrapper">
  <div></div>
  <div></div>
  <div></div>
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/wontem/mixed-spinner-1-jPwONR */
html, body {
  background: #101114;
  position: absolute;
  width: 100%;
  height: 100%;
  font-size: 40px;
}

.wrapper {
  width: 1em;
  height: 1em;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  margin: auto;
}
.wrapper div {
  mix-blend-mode: screen;
  position: absolute;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  -webkit-animation: move 1s alternate infinite ease-in-out;
          animation: move 1s alternate infinite ease-in-out;
}
.wrapper div:nth-child(1) {
  -webkit-animation-delay: -50ms;
          animation-delay: -50ms;
  background: blue;
  box-shadow: 0 0 1em rgba(0, 0, 255, 0.5);
}
.wrapper div:nth-child(2) {
  -webkit-animation-delay: -100ms;
          animation-delay: -100ms;
  background: lime;
  box-shadow: 0 0 1em rgba(0, 255, 0, 0.5);
}
.wrapper div:nth-child(3) {
  -webkit-animation-delay: -150ms;
          animation-delay: -150ms;
  background: red;
  box-shadow: 0 0 1em rgba(255, 0, 0, 0.5);
}

@-webkit-keyframes move {
  0% {
    -webkit-transform: translate3d(-2em, 0, 0);
            transform: translate3d(-2em, 0, 0);
  }
  100% {
    -webkit-transform: translate3d(2em, 0, 0);
            transform: translate3d(2em, 0, 0);
  }
}

@keyframes move {
  0% {
    -webkit-transform: translate3d(-2em, 0, 0);
            transform: translate3d(-2em, 0, 0);
  }
  100% {
    -webkit-transform: translate3d(2em, 0, 0);
            transform: translate3d(2em, 0, 0);
  }
}

Comments