本文介绍了覆盖浏览器滚动行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个用户界面的想法,需要覆盖浏览器的滚动功能,所以我可以为滚动操作创建自己的行为。
I have an user interface idea that requires overriding the browser's scroll functionality so I can create my own behaviors for the scroll action.
有没有办法防止当用户滚动时滚动窗口?
Is there a way to prevent the window from scrolling when the user scrolls?
推荐答案
你可以尝试这个
$(window).scroll(function() {
$(this).scrollTop(0);
});
这篇关于覆盖浏览器滚动行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!