简体   繁体   中英

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. 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):

    @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;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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