<repeating-linear-gradient>:repeating-linear-gradient([ <point>,]? <color-stop>[, <color-stop>]+);
<point>:[ left | right ]? [ top | bottom ]? || <angle>?
<color-stop>:<color> [ <length> | <percentage> ]?
示例代码:
(图一)
repeating-linear-gradient(#f00,#ff0 10%,#f00 15%); repeating-linear-gradient(top,#f00,#ff0 10%,#f00 15%); repeating-linear-gradient(-90deg,#f00,#ff0 10%,#f00 15%); repeating-linear-gradient(270deg,#f00,#ff0 10%,#f00 15%);
以上几句代码都可以实现如(图一)的渐变效果
IE | Firefox | Safari | Chrome | Opera |
---|---|---|---|---|
6-9 #1 | 4.0-15.0 -moz- | 4.0-6.0 -webkit- | 4.0-25.0 -webkit- #2 | 15.0 |
10.0 | 16.0 | 6.1 | 26.0 |