HTML
<div class="loader">
<div style="--i:0;"></div>
<div style="--i:1;"></div>
<div style="--i:2;"></div>
<div style="--i:3;"></div>
<div style="--i:4;"></div>
</div>CSS
*{
margin:0;
padding:0;
box-sizing:border-box;
}
body{
display:flex;
justify-content:center;
align-items:center;
min-height:100vh;
background:tomato;
}
.loader div{
width:50px;
height:50px;
background:#fff;
display:inline-block;
border-radius:50%;
transform:scale(0);
animation:animar 2s linear infinite;
animation-delay:calc(0.1s * var(--i));
}
@keyframes animar{
0%{
transform:scale(0);
}
50%{
transform:scale(0.8);
}
100%{
transform:scale(0);
}
}
Deja tu comentario