Scroll bar like Google is using

匿名 (未验证) 提交于 2019-12-03 02:30:02

问题:

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

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).

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.

回答1:

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



回答2:

I have been using the lion bars jquery scroller, and I think it meets all the specifications you mentioned, give it a try.



回答3:

Take a look at https://gist.github.com/fanzeyi/3995618

Works fine for me.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!