CSS Radial Gradients
A radial gradient is defined by its center.
To create a radial gradient you must also define at least two color stops.
background-image: radial-gradient(shape size at position, start-color, ..., last-color);
By default, shape is ellipse, size is farthest-corner, and position is center.
Radial Gradient - Evenly Spaced Color Stops (this is default)
Radial Gradient - Differently Spaced Color Stops
The following example shows a radial gradient with differently spaced color stops:
The shape parameter defines the shape. It can take the value circle or ellipse. The default value is ellipse. The following example shows a radial gradient with the shape of a circle:
The size
parameter defines the size of the radial gradient. It can take the following four values:
The repeating-radial-gradient()
function is used to create and repeat radial gradients.
This is useful when you want a pattern that repeats outward from the center in a circular or elliptical shape.