简体   繁体   中英

Remove vertical scrollbars without additional element wrapping?

I've been searching for a way to remove the scrollbars on a page while still allowing scrolling, but I've found that the general consensus is that you'd need to add additional elements that wrap your existing content.

Maybe I'm missing something. Is there any way, using CSS and JS, to remove the vertical scrollbars while still allowing scrolling without adding additional elements around my content?

The reason I ask is because I'm hoping to implement it into a jQuery plugin that effectively hides the scrollbars in favor of the plugins functionality, and I'd rather not wrap the plugin-user's page with additional elements for the sake of conflicting with their styling.

Any help is much appreciated.

Currently there isn't. Browsers don't support it. Facebook and other sites that implemented their own scrollbar functionality replacing the browser's use a technique to push the browser provided scrollbar out of the visible container and render their own scrollbar to be visible.

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