<div class="loading">
<span></span>
<span></span>
<span></span>
</div>
body{
height:100vh;
display:grid;
place-items:center;
}
.loading {
margin: 1rem 2rem;
display: flex;
justify-content: center;
gap: 10px;
}
span {
width: 20px;
height: 20px;
border-radius: 50%;
animation-name: sliding;
animation-duration: 1.5s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
span:nth-child(1) {
background-color: violet;
animation-delay: 0.3s;
}
span:nth-child(2) {
background-color: rgb(235, 86, 235);
animation-delay: 0.4s;
}
span:nth-child(3) {
background-color: rgb(201, 32, 201);
animation-delay: 0.5s;
}
@keyframes sliding {
20% {
opacity: 0;
transform: translateX(-500px);
}
70% {
opacity: 0;
transform: translateX(500px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.