我正在尝试在移动设备上隐藏滚动条。桌面上没有任何东西看起来很好(没有srollbar),但是当我检查一些Android设备(ipad)时 - 我仍然可以看到灰色,瘦的拇指。可以从浏览器隐藏预定义的滚动条。
我的代码(在桌面上运行良好)。
body::-webkit-scrollbar {
background-color: #fff;
}
body::-webkit-scrollbar-thumb {
background-color: #fff;
}
使用-webkit-appearance:none
隐藏滚动条。
::-webkit-scrollbar {
-webkit-appearance: none;
}
Try this
::-webkit-scrollbar {
width: 0px;
background: transparent; /* make scrollbar transparent */
}