说明:
1.360兼容模式效果不好
2.可以直接用不同浏览器打开这个页面查看效果
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> body{ background-color:#2C3849; /*渐变色--浏览器兼容性*/ background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#2a4053), to(#47354a));/*谷歌*/ FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#2a4053,endColorStr=#47354a); /**IE 6 7 8*!**/ background: -ms-linear-gradient(top, #2a4053,#47354a); /* IE 10 */ background:-moz-linear-gradient(top, #2a4053,#47354a);/*火狐*/ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#5e91ca), to(#47354a)); /* Safari 4-5, Chrome 1-9*/ background: -webkit-linear-gradient(top, #2a4053,#47354a); /*Safari5.1 Chrome 10+*/ background: -o-linear-gradient(top, #2a4053,#47354a); /*Opera 11.10+*/
} </style> </head> <body> </body> </html> |
|
转载于:https://www.cnblogs.com/haley168/p/gradient.html