当我向下滚动时,CSS3 渐变下方出现不需要的空白
我整晚都在努力寻找解决这个问题的方法,但未能找到适合我的方法。
如果你的窗户足够大,这看起来很完美: http://www.markerin.com/kandk/test.html
但是...如果您的窗口不够高,并且您滚动,则渐变下方会有空白区域。有没有办法将 #778899 定义为默认背景颜色,并且仍然在顶部有渐变,或者将渐变固定到位?谢谢!
I've been trying all night to find a solution to this problem and haven't been able to find one that works for me.
If your window is big enough, this looks perfect:
http://www.markerin.com/kandk/test.html
but... if your window isn't tall enough, and you scroll, there is white space below the gradient. Is there a way to define #778899 as the default background color and still have the gradient at the top, or to fix the gradient in place? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将您的颜色添加到 CSS 中。
将#FFF 替换为您的颜色
Add your color to CSS.
Replace #FFF with your color
快速修复将使用
max-height
或/和min-height
,以及哈编码/固定值(例如:600px
和800px
对于每个)而不是height:100%
,在渐变 div 类Quick fix will be use
max-height
or/andmin-height
, with harcoded/fixed value (eg:600px
and800px
for each) insteadheight:100%
, at gradient div class