Web Development, CSS.
there is actually a gap between the rolling speed on Windows and Mac OS, so you can use the ‘userAgent’ to calculate them separately. if(navigator.userAgent.indexOf("Window")>0) { $("header").mousewheel(function(event, delta) { this.scrollLeft -= delta * 35; event.preventDefault(); }) } else