HTML/CSS:滚动条出现在HTML元素下方 [英] HTML/CSS: scroll bar appears below HTML elements

查看:54
本文介绍了HTML/CSS:滚动条出现在HTML元素下方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Chrome和Safari中,垂直滚动条显示在页面HTML内容下方,如下所示:

In Chrome and Safari, the vertical scroll bar appears below HTML content on the page, like so:

我摆弄着 ::-webkit-scrollbar ,但是我能得到的最接近的是将滚动条的宽度更改为 0px .该部分的div是:

I fiddled with ::-webkit-scrollbar, but the closest i could get was change the scroll bar width to 0px. The div of that section is:

.displayContent { min-width:620px; width:100%; height:auto; overflow:hidden; }

这发生在Safari(但不是iOS上的移动Safari)和Chrome浏览器中.Firefox很好.我也尝试过处理溢出问题,但无法获得想要的结果.

This occurs in Safari (but not mobile Safari on iOS) and Chrome. Firefox is fine. I also tried fiddling with overflow as well, but could not get the results i wants.

建议?

推荐答案

尝试一下-

html, body { 
    height:100%; 
    width:100%; 
    overflow:auto;
}

这篇关于HTML/CSS:滚动条出现在HTML元素下方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆