隐藏在MS Edge和Firefox中的滚动条? [英] Hiding the scroll bar in MS Edge and Firefox?
本文介绍了隐藏在MS Edge和Firefox中的滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个可滚动菜单,该菜单必须是可滚动的.我使用以下方法在Chrome中隐藏了滚动条:
I have a scrollable menu, which needs to be scrollable. I hide the scroll bar in Chrome by using:
.menu::-webkit-scrollbar {
display: none;
}
哪个工作. Firefox和MS Edge会做同样的事情吗?
Which works. What is the same for Firefox and MS Edge that will do the same?
谢谢
推荐答案
关于overflow-y:自动吗?仅当菜单的长度大于视口时,才应显示滚动条.
What about overflow-y: auto? That should show the scrollbar only when the menu is longer than the viewport.
这篇关于隐藏在MS Edge和Firefox中的滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文