CSS Nested Rings Spinner

Three nested arcs in different colors spinning at different speeds, built from one element.

  • arcs
  • circles
  • concentric
  • multicolor
  • rotate
HTML
<div class="spinner-nested" role="status" aria-label="Loading"></div>
CSS
.spinner-nested {
  position: relative;
  width: 64px;
  height: 64px;
  border: 3px solid transparent;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spinner-nested-spin 1.4s linear infinite;
}

.spinner-nested::before,
.spinner-nested::after {
  content: "";
  position: absolute;
  border: 3px solid transparent;
  border-radius: 50%;
}

.spinner-nested::before {
  inset: 5px;
  border-top-color: #ec4899;
  animation: spinner-nested-spin 1s linear infinite reverse;
}

.spinner-nested::after {
  inset: 15px;
  border-top-color: #f59e0b;
  animation: spinner-nested-spin 0.7s linear infinite;
}

@keyframes spinner-nested-spin {
  to { transform: rotate(1turn); }
}

@media (prefers-reduced-motion: reduce) {
  .spinner-nested,
  .spinner-nested::before,
  .spinner-nested::after { animation-duration: 3s; }
}

About this CSS Nested Rings Spinner

This CSS Nested Rings Spinner is 39 lines of pure CSS (0.8 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms and reduced-motion support. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.

CSS features used

Customize it

The colors in this snippet. Search and replace them to match your brand:

  • #6366f1
  • #ec4899
  • #f59e0b

How to use this nested rings spinner

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .spinner-nested class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).

Building with an AI tool?

“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.

Feedback