Usage of repeating-linear-gradient() CSS function



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

Example

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

Live demo

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

Advertisements