Sprite Sheet Animations.
Use steps() and background-position to cycle through six drawn frames.
View code
<div class="sprite" role="img" aria-label="Six-frame rotating symbol"></div>:root { color-scheme: dark; font: 15px system-ui, sans-serif; color: #dbff55; }
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; display: grid; place-items: center; overflow: hidden; background: transparent; }
.tile { display: grid; place-items: center; width: 68px; aspect-ratio: 1; border-radius: 18px; background: currentColor; }
.tile { background: #dbff55; color: #202415; font-size: 30px; }
canvas { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; }
button { font: inherit; color: #f3f1e9; background: #191919; border: 1px solid #ffffff66; padding: 8px 14px; border-radius: 24px; cursor: pointer; }
:focus-visible { outline: 2px solid #dbff55; outline-offset: -3px; }
.notice { max-width: 34ch; padding: 16px; color: #fff; }
@media (prefers-reduced-motion: reduce) { .sprite { animation-play-state: paused; } }
.sprite {
width: 72px;
height: 72px;
background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22432%22%20height%3D%2272%22%3E%3Cg%20transform%3D%22translate(36%2036)%20rotate(0)%22%3E%3Cpath%20fill%3D%22%23dbff55%22%20d%3D%22M-7-27H7V-7H27V7H7V27H-7V7H-27V-7H-7Z%22%2F%3E%3Ccircle%20fill%3D%22%23262a1c%22%20r%3D%225%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(108%2036)%20rotate(15)%22%3E%3Cpath%20fill%3D%22%23dbff55%22%20d%3D%22M-7-27H7V-7H27V7H7V27H-7V7H-27V-7H-7Z%22%2F%3E%3Ccircle%20fill%3D%22%23262a1c%22%20r%3D%226%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(180%2036)%20rotate(30)%22%3E%3Cpath%20fill%3D%22%23dbff55%22%20d%3D%22M-7-27H7V-7H27V7H7V27H-7V7H-27V-7H-7Z%22%2F%3E%3Ccircle%20fill%3D%22%23262a1c%22%20r%3D%227%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(252%2036)%20rotate(45)%22%3E%3Cpath%20fill%3D%22%23dbff55%22%20d%3D%22M-7-27H7V-7H27V7H7V27H-7V7H-27V-7H-7Z%22%2F%3E%3Ccircle%20fill%3D%22%23262a1c%22%20r%3D%228%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(324%2036)%20rotate(60)%22%3E%3Cpath%20fill%3D%22%23dbff55%22%20d%3D%22M-7-27H7V-7H27V7H7V27H-7V7H-27V-7H-7Z%22%2F%3E%3Ccircle%20fill%3D%22%23262a1c%22%20r%3D%229%22%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%22translate(396%2036)%20rotate(75)%22%3E%3Cpath%20fill%3D%22%23dbff55%22%20d%3D%22M-7-27H7V-7H27V7H7V27H-7V7H-27V-7H-7Z%22%2F%3E%3Ccircle%20fill%3D%22%23262a1c%22%20r%3D%2210%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 0 0 no-repeat;
animation: frames .7s steps(6) infinite;
}
@keyframes frames { to { background-position-x: -432px; } }// The frame timing and sprite offsets are handled by CSS.