Repeat a linear gradient with CSS

Use the repeating-linear-gradient() method to repeat linear gradient.

You can try to run the following code to implement the repeating-linear-gradient() function in CSS


Live Demo

<!DOCTYPE html>
         #demo {
            height: 300px;
            background: repeating-linear-gradient(green 20%, orange 40%, maroon 40%);
      <p>Repeating linear gradient.</p>
      <div id = "demo"></div>
Lakshmi Srinivas
Lakshmi Srinivas

Programmer / Analyst / Technician