如何在 iOS Safari 和 Chrome 中隐藏 native 滚动条?我正在使用这段代码:
.scroll-snap-container::-webkit-scrollbar {
display: none!important;
height: 0;
width: 0;
background-color: transparent;
}
这不适用于 iOS Safari 和 Chrome。
最佳答案
尝试将其添加到您的代码中。
@media screen and (-webkit-min-device-pixel-ratio:0) {
.scroll-snap-container::-webkit-scrollbar {
display: none!important;
height: 0;
width: 0;
background-color: transparent;
}
}
关于javascript - 如何在 iOS Chrome 中使用 CSS scroll snap + picture bug 隐藏滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56792969/