简体   繁体   English

保留滚动条同时保留滚动条

[英]Disable scrollbar while preserving scrolling

I'm stack on trying to disable html scrollbar while preserving the scrolling and keeping the scrollbar of text area. 我正在尝试禁用html滚动条,同时保留滚动并保留文本区域的滚动条。 here 这里

I've tried to set this: 我试着设置这个:

html {overflow:hidden;}

it worked partially butI'm not satisfied with that so do you have any perfect solution? 它部分起作用,但是我对此不满意,所以您有什么完美的解决方案吗?

thanks. 谢谢。

Basically I dont want two scrollbar... 基本上我不想要两个滚动条...

If you aren't afraid of plugins, iScroll may be the perfect solution. 如果您不担心插件,则iScroll可能是完美的解决方案。 This is made to simulate scrolling like known from mobile devices and can transform any element to scrollable areas and also provides options to hide the scrollbar when you're not scrolling. 它可以像模拟移动设备一样模拟滚动,并且可以将任何元素转换为可滚动区域,并且还提供了在不滚动时隐藏滚动条的选项。 Here, check this example (but you really can hide the scrollindicators even if not shown there): 在这里,请检查此示例(但即使没有显示,您也可以隐藏滚动指示符):

simple iScroll demo 简单的iScroll演示

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

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