JSFiddle - React, Tailwind, and code Playground
by Сергей Тарасевич
HTML
<div class="spinner-wave">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
CSS
.spinner-wave {
margin: 0 auto;
width: 100px;
height: 50px;
text-align: center;
}
.spinner-wave > div {
background-color: #333;
height: 100%;
width: 6px;
display: inline-block;
-webkit-animation: wave 1.2s infinite ease-in-out;
animation: wave 1.2s infinite ease-in-out;
}
.spinner-wave div:nth-child(2) {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
}
.spinner-wave div:nth-child(3) {
-webkit-animation-delay: -1.0s;
animation-delay: -1.0s;
}
.spinner-wave div:nth-child(4) {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
.spinner-wave div:nth-child(5) {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s;
}
@-webkit-keyframes wave {
0%, 40%, 100% {
-webkit-transform: scaleY(0.4)
}
20% {
-webkit-transform: scaleY(1.0)
}
}
@keyframes wave {
0%, 40%, 100% {
transform: scaleY(0.4);
}
20% {
transform: scaleY(1.0);
}
}