jQuery 如何隐藏滚动条但仍然可以向上/向下滚动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15985020/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 16:08:36  来源:igfitidea点击:

How to hide scrollbar but still can scroll up/down

jquerycss

提问by Lizza Faith

Is there a way on how to hide scroll bar and still can scroll up down using mouse or direction keys?

有没有办法隐藏滚动条并且仍然可以使用鼠标或方向键向下滚动?

Any one can help?

任何人都可以帮忙吗?

回答by Shinya Koizumi

I am not sure what exactly what you want but I like using this plugin for situation like when you want to hide the scrollbar by default and shows up when you hover on the textarea

我不确定你到底想要什么,但我喜欢使用这个插件来处理默认情况下你想隐藏滚动条并在你将鼠标悬停在 textarea 上时显示的情况

http://rocha.la/jQuery-slimScroll

http://rocha.la/jQuery-slimScroll