1

在即,当我尝试使我的背景在正文和 html 标记高度上使用 100% 扩展页面长度时,它消除了滚动的能力。有什么办法我可以做到这两点吗?我正在 ie8 中对此进行测试,但我不确定问题是否存在于其他地方。如果需要该页面的链接,请请求它,我可以发布它。我的背景是一个 CSS 渐变,无论内容高度如何,它都会在所有浏览器上填充页面。然而,在 ie 中,内容高度决定了背景的高度。我查了一下,这可以通过

 html, body {height:100%;}//this results in a loss in the ability to scroll on pages with lengthy content but does produce a background that fills the page with short content. 

或者

html, body {min-height:100%}//this results in a background that falls short of the full page when short content is present
4

1 回答 1

2

添加overflow-y: scroll;到您的 html 标记。

于 2012-09-03T06:45:16.090 回答