这是我为解决此问题所做的工作...它将显示整个内容长度的渐变,然后简单地回退到背景色(通常是渐变中的最后一种颜色)。
html {
background: #cbccc8;
}
body {
background-repeat: no-repeat;
background: #cbccc8;
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#cbccc8));
background: -moz-linear-gradient(top, #fff, #cbccc8);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#cbccc8');
}
Hello world!
我已经在FireFox 3.6,Safari 4和Chrome中对此进行了测试,对于某些出于某种原因不支持HTML标记样式的浏览器,我将背景颜色保留在主体中。