明天就是大年三十了,年货一定都买齐了吧,首先祝您2012新年快乐!还记得6天前给大家分享的几款网页背景渐变特效吗?有只兼容IE浏览器的、只兼容火狐浏览器的、还有同时兼容IE和FireFox的,有的朋友肯定会说怎么没有谷歌chrome浏览器下的呢?您别着急,现在就来分享谷歌浏览器下的网页背景渐变CSS代码。 示例: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html > <head> <title>chrome/Safari浏览器下的渐变背景实现</title> <style type="text/css" rel="stylesheet"> .gradient{ width:300px; height:150px; background:-webkit-gradient(linear, 0 0, 0 bottom, from(#ff0000), to(rgba(0, 0, 255, 0.5))); } </style> </head> <body> <div class="gradient"></div> </body> </html><div style="text-align:center;margin:30px 0 0 0;"><hr style="color:#999;height:1px;">如不能显示效果,请按Ctrl+F5刷新本页,更多网页代码:<a href='http://www.veryhuo.com/' target='_blank'>http://www.veryhuo.com/</a></div>提示:可修改后代码再运行! 文章导航 CSS代码二例:边框阴影效果与DIV层垂直居中CSS3网页背景渐变代码,支持火狐和IE浏览器