简体   繁体   English

删除垂直滚动条而没有其他元素包装?

[英]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? 有什么方法可以使用CSS和JS删除垂直滚动条,同时仍然允许滚动而不在内容周围添加其他元素?

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. 我问的原因是因为我希望将其实现到一个jQuery插件中,该插件可以有效地隐藏滚动条,以支持插件功能,而我宁愿不与其他用户一起包装插件用户页面,以免与之冲突。他们的风格。

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. 实现了自己的滚动条功能以替代浏览器的Facebook和其他站点使用一种技术将浏览器提供的滚动条推出可见容器,并使自己的滚动条可见。

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

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