自定义滚动条 [英] Custom scrollbar

查看:149
本文介绍了自定义滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在我的网站中加入自定义滚动条,因为有设置高度的div会溢出。我已经设法得到了我想使用webkit样式在CSS中的,但我意识到,当看到在Firefox或IE的网站时会出现问题。



作为一个结果,我试图将jScrollPane库纳入我的网站,但它导致各种各样的js冲突,这是把整个网站陷入混乱!



有任何更简单的方法来自定义我的滚动条,以便我有跨浏览器兼容性,而不添加新的js页面到网站?



或者 - 有一种方式,我可以附加东西

解决方案 / div>

我对你究竟要求什么有点困惑,但如果你正在寻找一个可以使用CSS定制的某种滚动条,那么不要再看到 jQuery UI的滑块



您必须添加一些事件处理程序来做滚动,但它不应该太难了所有。


I am hoping to incorporate custom scrollbars in my site as there are divs with set heights that will overflow. I have managed to get exactly what I want using webkit styling in css however I am aware that there will be issues when looking at the site in Firefox or IE.

As a result, I tried to incorporate the jScrollPane library into my site but its causing all sorts of js "clashes" which is throwing the whole site into a mess!

Are there any simpler methods to customise my scroll bar so that I have cross browser compatibility without adding a new js page to the site?

Alternatively - is there a way I can attach something to the css for when the browser is firefox!?

Thanks JD

解决方案

I'm a little confused with what exactly you're asking for, but if you're looking for a scroll bar of some sort that can be customized with CSS, look no further than jQuery UI's Slider.

You'll have to add some event handlers to do the scrolling, but it shouldn't be too difficult over-all.

这篇关于自定义滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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