π What Is repeating-radial-gradient()?
The repeating-radial-gradient() function generates a radial gradient that repeats infinitely outward from a center point. Unlike radial-gradient() (which renders once), the repeating version creates patterned circles or ellipses that tile seamlessly.
Note
β Perfect for backgrounds and UI effects
β Does not require images
π¦ Syntax
Basic Syntax
repeating-radial-gradient(shape size at position, color-stop1, color-stop2, ...);Everything works like radial-gradient(), but the gradient pattern repeats automatically.
π 1. Basic Repeating Circles
Simple repeating gradient
background: repeating-radial-gradient(
circle,
black 0,
black 5px,
white 5px,
white 15px
);Produces a target-like pattern with repeated rings.
π 2. Polka Dot Pattern
Polka dots
background: repeating-radial-gradient(
circle,
#333 0 6px,
transparent 6px 20px
);Creates dots spaced evenly across the background.
π 3. Ripple / Wave Pattern
Ripple effect
background: repeating-radial-gradient(
circle,
#6ae 0,
#6ae 10px,
#def 10px,
#def 20px
);Looks like expanding water ripples.
π 4. Concentric Rings
Concentric circles
background: repeating-radial-gradient(
circle at center,
red 0,
red 10px,
yellow 10px,
yellow 20px
);Useful for target graphics, focus effects, UI spotlights.
π 5. Offset Center Position
Custom center position
background: repeating-radial-gradient(
circle at 20% 40%,
#000 0,
#000 8px,
#fff 8px,
#fff 18px
);Moves the gradient center for asymmetrical design patterns.
π 6. Elliptical Repeating Gradient
Ellipse pattern
background: repeating-radial-gradient(
ellipse,
#4a90e2 0,
#4a90e2 10px,
white 10px,
white 25px
);Creates repeated ovals rather than circles β great for decorative textures.
π 7. Dotted Screen / Noise Effect
Screen effect
background: repeating-radial-gradient(
circle,
rgba(0,0,0,0.15) 0 1px,
transparent 1px 4px
);Looks like subtle screen grain or retro printing dots.
π 8. Gradient + Pattern Combination
Overlaying gradients
background:
radial-gradient(circle, rgba(0,0,0,0.2), transparent 70%),
repeating-radial-gradient(circle, #ccc 0 5px, transparent 5px 20px);Creates layered visual depth using two gradient images.
π 9. Animated Repeating Radial Pattern
Animation
.animated-bg {
background: repeating-radial-gradient(
circle,
#000 0,
#000 5px,
#fff 5px,
#fff 15px
);
animation: pulse 2s linear infinite;
}
@keyframes pulse {
0% { background-size: 100% 100%; }
100% { background-size: 120% 120%; }
}Creates a pulsing radar-like animation.
π§ͺ Real-World Examples
1οΈβ£ Retro Poster Background
Retro vibe
.retro {
background: repeating-radial-gradient(
circle,
#ff6b6b 0,
#ff6b6b 15px,
#feca57 15px,
#feca57 30px
);
}2οΈβ£ Gaming Radar Effect
Radar effect
.radar {
background: repeating-radial-gradient(
circle,
rgba(0,255,0,0.4) 0,
rgba(0,255,0,0.4) 2px,
transparent 2px,
transparent 20px
);
}3οΈβ£ Decorative Circular Texture
Texture
.texture {
background: repeating-radial-gradient(
circle,
#ddd 0,
#ddd 3px,
#fff 3px,
#fff 12px
);
}β οΈ Common Mistakes
- β Using no explicit lengths β inconsistent pattern
- β Very small stop differences β heavy CPU usage
- β Expecting smooth fades β repeating gradients produce tiled patterns
- β Forgetting that the pattern repeats infinitely
Note
π₯ Summary
repeating-radial-gradient() allows you to create dynamic, repeating circular or elliptical patterns with pure CSS. Itβs perfect for polka dots, ripples, target rings, radar animations, screen textures, and artistic backgrounds.
Learn more βMDN Docs π