CSSrepeating-radial-gradient() Function
Example
A repeating radial gradient:
background-image: repeating-radial-gradient(red, yellow 10%, green 15%);
}
More "Try it Yourself" examples below.
Definition and Usage
The CSSrepeating-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
| Value | Description |
|---|---|
| shape | Defines the shape of the gradient. Possible values:
|
| size | Defines the size of the gradient. Possible values:
|
| atposition | 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 withshapesize and atposition set:
background-image: repeating-radial-gradient(ellipse farthest-corner at 25% 25%, red, yellow 10%, green 15%);
}
Example
Another repeating radial gradient with two color stop positions set:
background-image: repeating-radial-gradient(red 0% 10%, yellow 11% 21%, green 22% 32%);
}
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

