在Firefox中隐藏滚动条(允许滚动,但只是没有滚动条) [英] Hidden scrollbars in Firefox (allows scrolling but just no scrollbar)

查看:348
本文介绍了在Firefox中隐藏滚动条(允许滚动,但只是没有滚动条)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个能够滚动但不显示滚动条的div。我找到了一个Webkit的解决方案(下面),但是如何在其他浏览器中这样做?

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?

我想避免使用javascript插件。希望找到一个CSS或供应商特定的解决方案。

I'd prefer to avoid using a javascript plugin. Hoping to find a CSS or vendor specific solution.

#photoreel::-webkit-scrollbar {
    height: 0;
    width: 0;
}
#photoreel {
    overflow-x: scroll;
    overflow-y: hidden;
}


推荐答案

在另一个div中,隐藏滚动条的 overflow:hidden

You must wrap your scrollable div in another div with overflow:hidden that hides the scrollbar.

请参阅 http://jsfiddle.net/qqPcb/ 的示例。

BTW:同样的技术使用< a href =http://jscrollpane.kelvinluck.com/scroll_on_left.html>一个名为jScrollPane的小jQuery插件

BTW: The same technique is used by a nice little jQuery plugin called jScrollPane

这篇关于在Firefox中隐藏滚动条(允许滚动,但只是没有滚动条)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆