chrome 正常,每滑一次滚轮,alert 1,2,3,4,5,6。。。 而火狐会莫名奇妙执行多次似的,第一次alert会输出不等值!
无标题文档
参照这篇文章,关掉火狐平滑滚动,但是如果滚轮滑动的比较快,还是会出现问题。http://mozilla.com.cn/forum.phpmod=viewthread&tid=35551&highlight=Scroll
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
throttledebouncerequestAnimationFrame + customEvent
原文