CSS:全尺寸 div 显示浏览器滚动条
我有一个网站需要在浏览器窗口中完全独立,即用户不必上下滚动即可查看网站的不同部分。太长而无法放入内容窗格的内容可以使用 Overflow:auto 进行处理,效果很好。
问题是,无论我尝试什么,我仍然遇到以下问题:
两组滚动条 http:// www.wikiforall.net/bad_scrollbars.png
因此,在成功填充浏览器窗口的内容下方,似乎存在一个间隙。这个间隙导致垂直滚动条显示出来(并且右侧似乎有一个类似的间隙,但不太容易看到)。我已经使用 Chrome 的元素检查器检查了这些元素,并且 标记仅覆盖了该间隙。所以我不知道差距从何而来。
主页 div 设置为 position:absolute
,左、右、上、下均设置为零。这些 div 还设置了 display: inline
,并且没有边距或填充。 html
和 body
标记的样式相同。
我已经四处寻找了一两天,但没有发现任何效果。有谁知道如何删除这些滚动条?
I have a site which needs to be fully self-contained in the browser window, ie, the user must not have to scroll up and down to view different parts of the site. Content that is too long to fit into the content pane is handled with overflow:auto, which is working fine.
the problem is, no matter what I try I still have the following problem:
two sets of scrollbars http://www.wikiforall.net/bad_scrollbars.png
So beneaht the content which successfully fills the browser window, there seems to be a gap. This gap causes the vertical scrollbar to show itself (and there appears to be a similar gap on the right side which isn't as easy to see). I've inspected the elements using Chrome's element inspector and the <html>
tag covers only up to that gap. So I have no idea where the gap is coming from.
The main page divs are setup with position: absolute
, with left, right, top, and bottom all set to zero. These divs also have display: inline
set, and do not have margins or padding. The html
and body
tags are styled the same way.
I've been looking around for a day or two but nothing I've found has worked. Does anyone know how to remove these scrollbars?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您始终可以使用:
隐藏滚动条。
You can always use:
To hide the scrollbars.