【发布时间】:2017-01-06 11:33:11
【问题描述】:
我正在制作一个网络应用程序,但我似乎无法摆脱 Mozilla Firefox 上菜单的滚动条。它在我测试过的所有浏览器中都能完美运行,除了 Firefox。
这是我用于滚动的 css,目前在 Chrome、IE、Edge 和 Opera 中有效,但在 Firefox 中无效。
.main-sidebar{
position:fixed
}
.bar{
max-height: 400px;
overflow-y: scroll;
}
.bar::-webkit-scrollbar {
display: none;
}
.bar {
-ms-overflow-style: none;
overflow:hidden;
}
html {
overflow: scroll;
overflow-x: hidden;
}
::-webkit-scrollbar {
width: 0px; /* remove scrollbar space */
background: transparent; /* optional: just make scrollbar invisible */
}
.bar 是我希望隐藏滚动的 div 类。菜单滚动正常,但它没有隐藏在 Firefox 上。 有什么想法吗?
【问题讨论】:
标签: javascript html css firefox scroll