简体   繁体   English

如何在Firefox中隐藏水平滚动条

[英]How to hide horizontal scrollbar in firefox

I want to hide the scroll bar that appears on a grid while scrolling in Firefox, however I would still be able to want to scroll freely without the scrollbar to appear visually.我想隐藏在 Firefox 中滚动时出现在网格上的滚动条,但是我仍然希望在没有滚动条的情况下自由滚动。 I tired this:我厌倦了这个:

.grid {
   scrollbar-width: none;
}

However, this hides the scrollbar vertically, and not horizontally.但是,这会垂直隐藏滚动条,而不是水平隐藏滚动条。 I want the vertical scroll to remain as is and hide the horizontal one.我希望垂直滚动保持原样并隐藏水平滚动。 Is there any other property that would help to achieve this?是否有任何其他属性可以帮助实现这一目标?

Try this code in userChrome.css (you may have to adjust the margin values):在 userChrome.css 中试试这个代码(你可能需要调整边距值):

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

:-moz-any(#content,#appcontent) browser{
 margin-right:-14px!important;
 overflow-y:scroll;
 margin-bottom:-14px!important;
 overflow-x:scroll;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM