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
Example
<!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>