Frontend Forever App
We have a mobile app for you to download and use. And you can unlock many features in the app.
Get it now
Intall Later
Run
HTML
CSS
Javascript
Output
body { background: #333333; } .loader { position: absolute; top: 50%; left: 50%; --from: 80px; --to: 200px; --size: 32px; --time: 7s; --count: 51; /* up to 100 */ --turns: 6; } .circle { position: absolute; --delay: calc(var(--time) / var(--count) * -1 * var(--i)); rotate: calc(var(--turns) * 1turn / var(--count) * var(--i)); animation: circle var(--time) var(--delay) ease-in-out infinite; } .circle:nth-child(n + var(--count)) { display: none; } .circle::before { content: ''; display: block; width: var(--size); aspect-ratio: 1/1; border-radius: 50%; background-color: white; transform-origin: center center; animation: circleSize var(--time) var(--delay) ease-in-out infinite; } /* rainbow */ .rainbow .circle::before { background-color: hsl( calc(1turn / ( var(--count) / var(--turns) ) * var(--i)) 100% 70% ); } /* animations */ @keyframes circle { from { transform: translate(0, var(--from)); } to { transform: translate(0, var(--to)); } } @keyframes circleSize { 0%, 100% { transform: scale(0); } 25%, 50% { transform: scale(1); } }