Firefox 中的隐藏滚动条(允许滚动但没有滚动条) [英] Hidden scrollbars in Firefox (allows scrolling but just no scrollbar)
问题描述
我想创建一个可以滚动但不显示滚动条的 div.我已经找到了 Webkit 的解决方案(如下),但如何在其他浏览器中完成?
我宁愿避免使用 javascript 插件.希望找到 CSS 或供应商特定的解决方案.
<小时>Webkit 解决方案
#photoreel::-webkit-scrollbar {高度:0;宽度:0;}#photoreel {溢出-x:滚动;溢出-y:隐藏;}
您必须使用 overflow:hidden
将可滚动 div 包装在另一个 div 中,以隐藏滚动条.
参见 http://jsfiddle.net/qqPcb/ 示例.
顺便说一句:一个名为 jScrollPane 的漂亮小 jQuery 插件
I'd like to create a div that is able to scroll but does not display scrollbars. I have found a solution for Webkit (below) but how can this be done in other browsers?
I'd prefer to avoid using a javascript plugin. Hoping to find a CSS or vendor specific solution.
Webkit Solution
#photoreel::-webkit-scrollbar {
height: 0;
width: 0;
}
#photoreel {
overflow-x: scroll;
overflow-y: hidden;
}
You must wrap your scrollable div in another div with overflow:hidden
that hides the scrollbar.
See http://jsfiddle.net/qqPcb/ for an example.
BTW: The same technique is used by a nice little jQuery plugin called jScrollPane
这篇关于Firefox 中的隐藏滚动条(允许滚动但没有滚动条)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!