I am writing a UserChromeJS script (If you don't know what UserChromeJS is, please take a look at http://userchromejs.mozdev.org/ )that turns the scrollbar into a floating one.
Link to my script: https://github.com/nightson/userChromeJS/blob/master/FloatingScrollbar.uc.js
What I want to do next is to make the scrollbar auto-hidden when not scrolling. But this is hard to achieve without being able to add/remove class to/from the scrollbar. I tried methods like querySelector and getAnonymousElementByAttribute without success. Could anyone help me?
ps: I don't want to hide the default scrollbar and create a new one, so please don't suggest solutions like jscrollpane.
What I want to do next is to make the scrollbar auto-hidden when not scrolling.
No, this has two issues:
onscroll
event will never be triggered, since the scrollbar is hidden by default
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.