我有一个网站使用这样的渐变:
#grad {
background: -webkit-linear-gradient(#87a0b4 80%, #6b88a1);
background: -o-linear-gradient(#87a0b4 80%, #6b88a1);
background: -moz-linear-gradient(#87a0b4 80%, #6b88a1);
background: linear-gradient(#87a0b4 80%, #6b88a1);
}
<body id="grad">
我遇到的问题是,如果页面恰好拉伸(stretch)得比我的标准窗口高(我确定这在不同的屏幕上会有所不同),则渐变会重置。
问题可以看这里:
http://overactiverexburg.com/Sage/bios.php
我怎样才能解决这个问题,无论页面结束多长时间,渐变总是在底部结束?
最佳答案
尝试将 background-attachment: fixed
和 height: 100%
添加到您的 #grad
关于html - 页面的渐变背景CSS全高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24833519/