If you've used a Mac desktop machine, one of the first things you'll notice is that scrolling is different on a Mac than on a Windows desktop.
Windows desktops scrolls in big chunks - multiple lines at a time.
Mac desktops have smooth scrolling - a few pixels at a time.
The difference is pretty obvious when you look at scroll-oriented websites such as http://benthebodyguard.com or http://nikebetterw开发者_Go百科orld.com
Is there a means by which we can control that scroll distance in the browser using javascript?
How the scroll wheel works is dependent on the users configuration of the scroll wheel, and isn't up to you. Users can choose how far the scroll goes.
Even if you were to hack something in place to get this working, I certainly wouldn't recommend it. Not everyone has fast machines that make such smooth scrolling a reasonable task.
You could implement your own scrolling method. Override the default behavior in JS and you'll get the same scrolling in all browsers. $(document).scroll();
should do the trick and do your own calculations and scrolling inside of it.
精彩评论