【发布时间】:2016-09-25 14:35:57
【问题描述】:
我想在没有看到滚动条的情况下进行水平滚动。 所以我尝试了多种方法,例如下面提供的解决方案。
Hide scroll bar, but still being able to scroll
我现在拥有的:
nav {
display: inline;
white-space: nowrap;
width: 100%;
height: 100%;
min-width: 75em;
overflow-y: hidden;
overflow-x: hidden;
.overflow_wrap {
overflow-x: scroll;
overflow-y: hidden;
-ms-overflow-style: none;
width: 100%;
height: 100%;
height: auto;
text-align: center;
float: left;
background-color: $white;
border-bottom: 1px solid $third_fontcolor;
&::-webkit-scrollbar {
width: 0 !important;
display: none;
background: transparent;
}
}
}
我可以水平滚动,但我仍然在其他浏览器中看到滚动条,然后是 Chrome。有没有办法来解决这个问题?我在没有看到滚动条的情况下看到了垂直滚动的多种解决方案,但没有看到水平滚动的解决方案。我可能错过了什么。
【问题讨论】:
-
所以你想对所有浏览器隐藏滚动条?
-
没错,只是隐藏它,同时保留滚动的可能性
-
第二个答案很有帮助,不是吗?为什么不试试这个?
-
这已经在我的代码中,但我仍然看到滚动条。
标签: css scroll scrollbar overflow horizontal-scrolling