Favorites

repeating-conic-gradient() CSS Function

repeating-conic-gradient()
CSS FunctionThis function is supported by all modern browsers.
Updated 1st January 2026

The repeating-conic-gradient() function creates a conic gradient that repeats around the center, useful for checkerboards and sunbursts.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

Description

The repeating-conic-gradient() CSS function is a powerful tool for creating smooth, repeating conical patterns around a central point, often producing effects similar to pie charts, spinning wheels, or radial stripes. Unlike linear or radial gradients, which transition along a straight line or from a center point outward, a conic gradient rotates colors around a center, with color stops defining where each color starts and ends in a circular motion. The "repeating" aspect means that after a defined segment of the gradient, the pattern repeats infinitely around the circle, making it especially useful for creating striped or patterned backgrounds without manually repeating sections.

The gradient radiates from a central point (by default the center of the element), and the angles between color stops determine the width of each colored section. This function can be combined with other background properties like background-size or background-repeat to create seamless patterns across elements. It can also be layered with linear-gradient() or radial-gradient() for more complex visual effects.

For example, to create a simple spinning wheel effect with alternating black and white segments:

.spinner {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    black 0deg 30deg,
    white 30deg 60deg
  );
}

Here, the black and white segments repeat every 60 degrees, producing a consistent radial stripe pattern.

The repeating-conic-gradient() is particularly effective for decorative backgrounds, loader animations, or visually indicating percentages in circular charts. Its behavior can be fine-tuned with the center position, angle adjustments, and color stop spacing, giving designers precise control over the visual rhythm of the pattern.

Interactive Demo

Demo Code
HTML Code
<div class="demo-element"></div>
CSS Code
.demo-element {
	width: 200px;
	height: 170px;
	border-radius: 8px;
	background: repeating-conic-gradient(#f72585 0 15deg, #ffe5f1 15deg 30deg);
}

Syntax

repeating-conic-gradient() = repeating-conic-gradient([from angle] [at position,] color degree, color degree, ...);

Values

  • from angleThe entire conic gradient is rotated by this angle. Default value is 0deg. Optional.
  • at positionSpecifies the gradient center of the conic gradient. Default value is center. Optional.
  • color degreeColor stops are the colors you want to render smooth transitions among. This value consists of a color value, followed by an optional stop position (a degree between 0 and 360 or a percent between 0% and 100%).

Example

<body>
<div class="sunburst-box"></div>
</body>
.sunburst-box {
width: 300px;
height: 300px;
border-radius: 50%; /* Makes it a circle */
border: 2px solid #333;

/* The Gradient Logic */
background: repeating-conic-gradient(
#f39c12 0deg 10deg, /* Orange slice from 0 to 10 degrees */
#f1c40f 10deg 20deg /* Yellow slice from 10 to 20 degrees */
);
}
Open in editor

Browser Support

The following information will show you the current browser support for the CSS repeating-conic-gradient() function. Hover over a browser icon to see the version that first introduced support for this CSS function.

This function is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.