css3背景颜色渐变属性——linear-gradient
作者:互联网
比如:黑色渐变到白色,代码如下:
.gradient{ background: -moz-linear-gradient(top, #000000 0%, #ffffff 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#000000), color-stop(100%,#ffffff)); background: -webkit-linear-gradient(top, #000000 0%,#ffffff 100%); background: -o-linear-gradient(top, #000000 0%,#ffffff 100%); background: -ms-linear-gradient(top, #000000 0%,#ffffff 100%); background: linear-gradient(to bottom, #000000 0%,#ffffff 100%); }
使用前:
使用后:
更多实现渐变的方法请查看:http://caibaojian.com/css3-background-gradient.html
标签:css3,linear,000000,gradient,background,0%,ffffff 来源: https://www.cnblogs.com/vickylinj/p/14154201.html