CSS repeating-radial-gradient() Function
Example
A repeating radial gradient:
#grad {
background-image: repeating-radial-gradient(red, yellow 10%, green 15%);
}
Try it Yourself »
More "Try it Yourself" examples below.
Definition and Usage
The CSS repeating-radial-gradient()
function is used to repeat radial gradients.
Example:
Radial Gradient | Repeating Radial Gradient |
---|---|
radial-gradient(red, yellow, green); | repeating-radial-gradient(red, yellow 10%, green 15%); |
Version: | CSS Images Module Level 3 |
---|
Browser Support
The numbers in the table specify the first browser version that fully supports the function.
Function | |||||
---|---|---|---|---|---|
repeating-radial-gradient() | 26 | 10 | 16 | 6.1 | 12.1 |
two-position color stops | 71 | 79 | 64 | 12.1 | 58 |
CSS Syntax
repeating-radial-gradient(shape size at position, start-color, ..., last-color);
Value | Description |
---|---|
shape | Defines the shape of the gradient. Possible values:
|
size | Defines the size of the gradient. Possible values:
|
at position | Defines the position of the gradient. Default is "center" |
start-color, ..., last-color | 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 percentage between 0% and 100% or a length along the gradient axis). |
More Examples
Example
Another repeating radial gradient with shape size and at position set:
#grad1 {
background-image: repeating-radial-gradient(ellipse
farthest-corner at 25% 25%, red, yellow 10%, green 15%);
}
Try it Yourself »
Example
Another repeating radial gradient with two color stop positions set:
#grad1 {
background-image: repeating-radial-gradient(red 0% 10%,
yellow 11% 21%, green 22% 32%);
}
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-conic-gradient() function
CSS reference: CSS repeating-linear-gradient() function