简体   繁体   English

如何在Firefox中使滚动条不可见

[英]How to make scrollbar invisible in Firefox

I'm looking for a way to make the scrollbar invisible in Firefox. 我正在寻找一种使Firefox中的滚动条不可见的方法。 That is, you shouldn't be able to see it, but you should still be able to scroll. 也就是说,您应该看不到它,但是仍然可以滚动。 For other browsers, this works: 对于其他浏览器,这有效:

::-webkit-scrollbar {display: none;}

However, it seems that this feature has been removed from Firefox. 但是,似乎该功能已从Firefox中删除。 Surely someone has found a workaround just for Firefox? 当然有人找到了仅适用于Firefox的解决方法吗?

If you want to hide scroll bar, you will need the CSS 如果要隐藏滚动条,则需要CSS

<body style="overflow:hidden;"> ...</body>

I am wondering, if scroll bar will not be available to your page, how your content is going to be read fully. 我想知道,如果您的页面无法使用滚动条,那么如何完全阅读您的内容。 By the way, this CSS works will all elements like <div></div> etc. too. 顺便说一下,这个CSS的作品也将像<div></div>等所有元素。

For scrolling you will need to add scroll event. 对于滚动,您将需要添加scroll事件。 Take a reference from here for scroll event handling. 从此处获取有关滚动事件处理的参考

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

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