一、条纹背景利用background为linear-gradient函数实现,linear-gradient取值如下:<angle>:角度,渐变的方向to left right top bottomcolor:指定颜色color-stop:指定渐变的起止颜色lengt ...
一、条纹背景
- 利用background为linear-gradient函数实现,linear-gradient取值如下:
- <angle>:角度,渐变的方向
- to left right top bottom
- color:指定颜色
- color-stop:指定渐变的起止颜色
- length:用长度值指定起止色的位置,不可为负值
- percentage:用百分比指定起止色的位置
- 语法格式:linear-gradient([[<angle>|to <side-to-corner>],]? <color-stop>[,<color-stop>]+)
- side-to-corner:[left|right] || [top||bottom]
- color-stop: <color>[<length>|<percentage>]?
- 示例代码(斜角条纹):
background: linear-gradient( 40deg, #fb3 5px, #58a 15px);width: 200px;height: 100px;margin: 0px auto;background-size: 30px 30px;
原标题:Css3新特性总结之边框与背景(二)
关键词:CSS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。