代码示例:(标识:css3_gradient-linear_repeating)
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
  height: 200px;
  background-color: red; /* 针对不支持渐变的浏览器 */
  background-image: repeating-linear-gradient(red, yellow 10%, green 20%);
}

#grad2 {
  height: 200px;
  background-color: red; /* 针对不支持渐变的浏览器 */
  background-image: repeating-linear-gradient(45deg,red,yellow 7%,green 10%);
}

#grad3 {
  height: 200px;
  background-color: red; /* 针对不支持渐变的浏览器 */
  background-image: repeating-linear-gradient(190deg,red,yellow 7%,green 10%);
}

#grad4 {
  height: 200px;
  background-color: red; /* 针对不支持渐变的浏览器 */
  background-image: repeating-linear-gradient(90deg,red,yellow 7%,green 10%);
}
</style>
</head>
<body>

<h1>重复线性渐变</h1>

<div id="grad1"></div>

<p>在 45deg 轴上重复的渐变,从红色开始到绿色结束:</p>
<div id="grad2"></div>

<p>在 190deg 轴上重复的渐变,从红色开始到绿色结束:</p>
<div id="grad3"></div>

<p>在 90deg 轴上重复的渐变,从红色开始到绿色结束:</p>
<div id="grad4"></div>

</body>
</html>
运行结果: