CSS repeating-conic-gradient() Function
Example
A repeating conic gradient:
#grad {
background-image: repeating-conic-gradient(red 10%,
yellow 20%);
}
Try it Yourself »
More "Try it Yourself" examples below.
Definition and Usage
The CSS repeating-conic-gradient()
function is used to repeat conic gradients.
Example:
Conic Gradient | Repeating Conic Gradient |
---|---|
conic-gradient(red, yellow); | repeating-conic-gradient(red 10%, yellow 20%); |
Version: | CSS Images Module Level 4 |
---|
Browser Support
The numbers in the table specify the first browser version that fully supports the function.
Function | |||||
---|---|---|---|---|---|
repeating-conic-gradient() | 69 | 79 | 83 | 12.1 | 56 |
CSS Syntax
repeating-conic-gradient([from angle] [at position,] color degree, color degree, ...);
Value | Description |
---|---|
from angle | Optional. The entire conic gradient is rotated by this angle. Default value is 0deg |
at position | Optional. Specifies the gradient center of the conic gradient. Default value is center |
color degree, ..., color degree | Color stops are the colors you want to render smooth transitions among. This value consists of a color value, followed by one or two optional stop positions (a degree between 0 and 360 or a percent between 0% and 100%). |
More Examples
Example
A repeating conic gradient with defined color-starts and color-stops:
#grad {
background-image: repeating-conic-gradient(red 0 30deg,
yellow 30deg 60deg, blue 60deg 90deg);
}
Try it Yourself »
More Examples
Example
Another repeating conic gradient with from angle and at position set:
#grad1 {
background-image: repeating-conic-gradient(from 10deg at
30% 30%, red 0 30deg,
yellow 30deg 60deg, blue 60deg 90deg);
}
Try it Yourself »
Related Pages
CSS tutorial: CSS Gradients
CSS reference: CSS background-image property
CSS reference: CSS conic-gradient() function
CSS reference: CSS linear-gradient() function
CSS reference: CSS radial-gradient() function
CSS reference: CSS repeating-linear-gradient() function
CSS reference: CSS repeating-radial-gradient() function