Live preview · fully interactive
The prompt
Build an equalizer bar loader. ## Look Five bars, 6px wide, 36px tall, radius 99px, color #7c6cff, gap 6px, aligned to the bottom. Page #08080d. ## Behavior Scale Y to 0.3 at the midpoint of the loop. Stagger delays 0s, 0.1s, 0.2s, 0.3s, 0.15s. Origin is the bottom. ## Design tokens - Bars #7c6cff; page #08080d. ## Motion - Duration 0.9s, ease-in-out, infinite. ## Constraints - Single self-contained HTML file. No libraries. CSS only. - Honor prefers-reduced-motion: reduce by skipping the loop and leaving a readable static frame - Readable at 390px width with no horizontal page scroll
The code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
background: #08080d; color: #f2f2f7; font-family: Inter, system-ui, sans-serif;
min-height: 100vh; overflow: hidden;
}
.hint { position: absolute; left: 16px; top: 16px; z-index: 5; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a8a99; }
main { min-height: 100vh; display: grid; place-items: center; } .eq { display: flex; gap: 6px; align-items: flex-end; height: 36px; } i { width: 6px; height: 100%; background: #7c6cff; border-radius: 99px; transform-origin: bottom; animation: bounce 0.9s ease-in-out infinite; } i:nth-child(2) { animation-delay: 0.1s; } i:nth-child(3) { animation-delay: 0.2s; } i:nth-child(4) { animation-delay: 0.3s; } i:nth-child(5) { animation-delay: 0.15s; } @keyframes bounce { 50% { transform: scaleY(0.3); } }
@media (max-width: 420px) {
.hint { font-size: 10px; letter-spacing: 0.08em; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
</style>
</head>
<body>
<main><div class="eq" aria-label="Loading"><i></i><i></i><i></i><i></i><i></i></div></main>
<script>
</script>
</body>
</html>About this effect
Bars scale on Y from a bottom origin between 0.3 and 1 on staggered 0.9s loops. Used as an inline loader for audio and AI tools.