我希望能够水平滚动,但不显示滚动条。
我知道,在 Chrome 中它是:
::-webkit-scrollbar {
display: none;
}
但是 Firefox 和 Internet Explorer 呢?有人给出了以下解决方案,但它似乎不适用于水平滚动条,它只适用于垂直滚动条。
#parent{
height: 100%;
width: 100%;
overflow: hidden;
}
#child{
width: 100%;
height: 100%;
overflow-y: scroll;
padding-right: 17px;
}
有人可以帮助我吗?
最佳答案
对于 fire fox
只需使用此规则:
overflow: -moz-scrollbars-none;
IE
:
-ms-overflow-style: none;
关于javascript - 设置溢出-x :scroll and hide the horizontal scrollbar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36051164/