<div id="loading">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
#loading {
height: 40px;
position: absolute;
left: calc(50% - 40px);
top: calc(50% - 10px);
text-align: center;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#loading span {
width: 10px;
height: 10px;
margin: 2px;
background: #868686;
border-radius: 10px;
display: inline-block;
transition: all 400ms ease;
animation: wave 2.5s ease infinite;
}
#loading span:nth-child(2) {
animation-delay: 100ms;
}
#loading span:nth-child(3) {
animation-delay: 200ms;
}
#loading span:nth-child(4) {
animation-delay: 300ms;
}
#loading span:nth-child(5) {
animation-delay: 400ms;
}
@keyframes wave {
0%, 100% {
transform: translate(0, 0);
background: #00b200;
}
40% {
transform: translate(0, 20px);
opacity: 0;
}
10% {
transform: translate(0, -20px);
background: #00ff00;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.