CSS3渐变背景 [英] CSS3 gradient background
本文介绍了CSS3渐变背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是否正确地将渐变背景从灰色的浅色到从底部到顶部应用到身体?
Is this right to apply gradient background to the body from a light shade of grey to white from bottom to top?
body {
background: -webkit-gradient(linear, bottom, top, from(#e7e7e7, to(#ffffff));
}
推荐答案
DEMO 以支持所有具备功能的浏览器
DEMO to support all capable browsers
body {
background-color: #ffffff;
background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#999999));
background-image: -webkit-linear-gradient(top, #ffffff, #999999);
background-image: -moz-linear-gradient(top, #ffffff, #999999);
background-image: -o-linear-gradient(top, #ffffff, #999999);
background-image: linear-gradient(to bottom, #ffffff, #999999);
}
CSS3请可能有用
这篇关于CSS3渐变背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文