CSS3属性之linear-gradient()
#grad {
background: -webkit-linear-gradient(red,yellow,blue); /* Safari 5.1-6.0 */
background: -o-linear-gradient(red,yellow,blue); /* Opera 11.1-12.0 */
background: -moz-linear-gradient(red,yellow,blue); /* Firefox 3.6-15 */
background: linear-gradient(red,yellow,blue); /* 标准语法 */
}
值 | 描述 |
---|---|
direction | 用角度值指定渐变的方向(或角度)。 |
color-stop1, color-stop2,… | 用于指定渐变的起止颜色。 |
注:默认值为clip,不具有继承性,支持所有主流浏览器
以内容、代码来自菜鸟教程