JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="roundwrapper delay1"></div>
<div class="roundwrapper delay2"></div>
<div class="roundwrapper delay3"></div>
<div class="roundwrapper delay4"></div>
<div class="roundwrapper delay5"></div>
</div>
CSS
.container {
position: relative;
width: 100px;
height: 100px;
margin: 100px auto;
}
.roundwrapper{
width: 24px;
height: 24px;
position: absolute;
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%;
-webkit-animation-name: rotate;
-moz-animation-name: rotate;
-o-animation-name: rotate;
animation-name: rotate;
-webkit-animation-duration: 5s;
-moz-animation-duration: 5s;
-o-animation-duration: 5s;
animation-duration: 5s;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-o-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
.roundwrapper:after{
content: "";
position: absolute;
width: 6px;
height: 6px;
border-radius: 50%;
background: black;
}
.delay1{
-webkit-animation-delay: 0;
-moz-animation-delay: 0;
-o-animation-delay: 0;
animation-delay: 0;
}
.delay2{
-webkit-animation-delay: 0.25s;
-moz-animation-delay: 0.25s;
-o-animation-delay: 0.25s;
animation-delay: 0.25s;
}
.delay3{
-webkit-animation-delay: 0.5s;
-moz-animation-delay: 0.5s;
-o-animation-delay: 0.5s;
animation-delay: 0.5s;
}
.delay4{
-webkit-animation-delay: 0.75s;
-moz-animation-delay: 0.75s;
-o-animation-delay: 0.75s;
animation-delay: 0.75s;
}
.delay5{
-webkit-animation-delay: 1s;
-moz-animation-delay: 1s;
-o-animation-delay: 1s;
animation-delay: 1s;
}
@keyframes rotate{
0%{
transform: translate(0px,0px) rotate(45deg);
animation-timing-function: ease-in;
opacity: 1;
}
15%{
transform: translate(0px, 0px) rotate(315deg);
animation-timing-function: linear;
opacity: 1;
}
45%{
transform: translate(0px, 0px) rotate(405deg);
animation-timing-function: ease-in-out;
opacity: 1;
}
50%{
transform: translate(0px, 0px) rotate(585deg);
animation-timing-function: linear;
opacity: 1;
}
...