Web development

CSS repeating-radial-gradient() Function

CSS repeating-radial-gradient() Function

The CSS repeating-radial-gradient() function repeats radial gradients.


background-image: repeating-radial-gradient(shape size at position, start-color, ..., last-color); 

shape – specifies the shape of the gradient (ellipse (default), circle).

size – specifies the size of the gradient (farthest-corner (default), closest-side, closest-corner, farthest-side).

position – specifies the position of the gradient (center (default)).

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 an optional stop position (a percentage between 0% and 100% or a length along the gradient axis).


<!DOCTYPE html>
#gradient-1 {
  height: 100px;
  width: 200px;
  position: relative;
  background-image: repeating-radial-gradient(yellow, orange 10%, green 15%);

<div id="gradient-1"></div>



Enjoy coding!

Read also:

CSS Gradients

CSS radial-gradient() Function