在所有浏览器中为我的网站启用平滑滚动 [英] Enable smooth scrolling for my website in all browsers
问题描述
我正在使用 Stellar 和 Skrollr 库。由于Firefox的平滑滚动功能,该网站在Firefox中表现完美,但在Chrome中,使用鼠标滚轮滚动是生涩的,并且视差效果几乎被破坏。有没有办法在保持性能的同时在所有浏览器中使用鼠标滚轮进行平滑滚动?
I'm developing a parallax scrolling website using the Stellar and Skrollr libraries. The website behaves perfectly in Firefox because of Firefox's smooth scrolling feature, but in Chrome, scrolling with the mouse wheel is jerky, and the parallax effect is almost ruined. Is there any way to get the smooth scrolling with the mouse wheel in all browsers while maintaining performance?
推荐答案
我找到了两个jQuery插件这可能会做你想要的。
I found two jQuery plugins that may do what you want.
Simplr- SmoothScroll //来源: SE问题
希望这会有所帮助。
编辑:由于评论而导致SmoothWheel消失 - 它已经很久没有更新了,而且SmoothScroll似乎维护得很好。
edit: Struck out SmoothWheel because of comments - it hasn't been updated in ages, and SmoothScroll seems well maintained.
这篇关于在所有浏览器中为我的网站启用平滑滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!