CSS
.bars {
display: flex;
align-items: flex-end;
gap: 5px;
height: 40px;
}
.bar {
width: 10px;
border-radius: 3px 3px 0 0;
background: #7c6cff;
animation: bars 1s ease-in-out infinite;
}
.bar:nth-child(1) {
height: 20%;
animation-delay: 0s;
}
.bar:nth-child(2) {
height: 50%;
animation-delay: 0.15s;
}
.bar:nth-child(3) {
height: 80%;
animation-delay: 0.3s;
}
.bar:nth-child(4) {
height: 60%;
animation-delay: 0.45s;
}
.bar:nth-child(5) {
height: 35%;
animation-delay: 0.6s;
}
@keyframes bars {
0%,
100% {
opacity: 0.25;
}
50% {
opacity: 1;
}
}
@media (prefers-reduced-motion: reduce) {
.bars,
.bars * {
animation: none !important;
}
}