CSS:linear-gradient()背景颜色渐变

background: linear-gradient(direction,color-stop1,color-stop2,...);

direction:用角度值指定渐变的方向(或角度);

color-stop1,color-stop2,...:用于指定渐变的起止颜色

PS:至少需要两种颜色

1 background: -webkit-linear-gradient(red,yellow,blue); /* Safari 5.1-6.0 */

2 background: -o-linear-gradient(red,yellow,blue); /* Opera 11.1-12.0 */

3 background: -moz-linear-gradient(red,yellow,blue); /* Firefox 3.6-15 */

4 background: linear-gradient(red,yellow,blue); /* 标准语法 */

发表回复

© 2023 狸玖技术站 - 基于 WordPress