像Google正在使用的滚动条 [英] Scroll bar like Google is using

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

问题描述

随着Google推出了最新的更新,这些网站都在获取自定义JS滚动条(至少在Chrome中是这样).

With the most latest updates Google has been rolling out, the sites have all been getting custom JS scroll bars (at least in Chrome).

我最喜欢它的地方是它简单易用.到目前为止,我见过的许多JS滚动条都不能很好地发挥作用-即,如果您滚动得太快或滚动并在周围移动鼠标,它们将不能很好地发挥作用.

What I like most about it is that its simple and works perfectly. Until now a lot of the JS scrollers that I have seen don't function that well - i.e. if you scroll really fast or scroll and move your mouse around they don't function that well.

因此,我只是想知道是否有人知道简单/小巧(代码占用率很小)并且功能良好(如前所述)的滚动条.

Hence I'm just wondering if anyone know of any scroller out there that is simple/small (code foot print is small) and functions well (as mentioned about).

我曾经考虑过使用jQueryUI的滚动作为基础,但是出于我的需要,我无法使用jQueryUI的这一功能.

I have thought about using jQueryUI's scroll as a base, but for my needs I can't take on jQueryUI for this one feature.

推荐答案

通过样式化

They're done by styling ::-webkit-scrollbar psudo-elements with CSS, not JS.

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

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