JSFiddle - React, Tailwind, and code Playground
by kinopyo
HTML
<span class="css3_loader"><figure></figure><figure></figure><figure></figure><figure></figure><figure></figure></span>
CSS
@-webkit-keyframes fade {
0% {
opacity: 1;
}
100% {
opacity: 0.1;
}
}
@-moz-keyframes fade {
0% {
opacity: 1;
}
100% {
opacity: 0.1;
}
}
.css3_loader figure {
background: olive;
margin: 0 1px 0 0;
display: inline-block;
height: 1em;
width: 4px;
opacity: 0.1;
-webkit-animation: fade 1s linear infinite;
-moz-animation: fade 1s linear infinite;
}
.css3_loader figure:nth-child(1) {
-webkit-animation-delay: 0s;
-moz-animation-delay: 0s;
-webkit-border-radius: 2px 0 0 2px;
-moz-border-radius: 2px 0 0 2px;
-ms-border-radius: 2px 0 0 2px;
-o-border-radius: 2px 0 0 2px;
border-radius: 2px 0 0 2px;
}
.css3_loader figure:nth-child(2) {
-webkit-animation-delay: 0.2s;
-moz-animation-delay: 0.2s;
}
.css3_loader figure:nth-child(3) {
-webkit-animation-delay: 0.4s;
-moz-animation-delay: 0.4s;
}
.css3_loader figure:nth-child(4) {
-webkit-animation-delay: 0.6s;
-moz-animation-delay: 0.6s;
}
.css3_loader figure:nth-child(5) {
-webkit-animation-delay: 0.8s;
-moz-animation-delay: 0.8s;
-webkit-border-radius: 0 2px 2px 0;
-moz-border-radius: 0 2px 2px 0;
-ms-border-radius: 0 2px 2px 0;
-o-border-radius: 0 2px 2px 0;
border-radius: 0 2px 2px 0;
}