gpt4 book ai didi

javascript - 在 mozilla firefox 上隐藏滚动条

转载 作者:行者123 更新时间:2023-11-28 05:17:49 25 4
gpt4 key购买 nike

我正在制作一个网络应用程序,我似乎无法摆脱 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 上。有什么想法吗?

最佳答案

你可以试试这个。

*{
scrollbar-width: none;
}

关于javascript - 在 mozilla firefox 上隐藏滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39223134/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com