gtxyzz

CSS repeating-linear-gradient() 函数,重复的线性渐变,反复渐变

gtxyzz web技术 2022-07-07 552浏览 0

CSS repeating-linear-gradient() 函数,重复的线性渐变,反复渐变

实例

重复的线性渐变:

#grad {
  background-image: repeating-linear-gradient(red, yellow 10%, green 20%);
}

定义和用法

repeating-linear-gradient() 函数用于重复线性渐变。

CSS 语法

background-image: repeating-linear-gradient(angle | to side-or-corner, color-stop1, color-stop2, ...);

重复线性渐变

注释:Internet Explorer 9 以及更早的版本不支持渐变。

继续浏览有关 css 的文章
发表评论