防止“过度滚动”的网页 [英] Prevent "overscrolling" of web page

查看:90
本文介绍了防止“过度滚动”的网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Chrome(Mac版)中,您可以像下面的屏幕截图中所示的那样过度滚动某个网页(因为缺少更好的字词),以查看后面的内容,类似于iPad或iPhone。

In Chrome for Mac, one can "overscroll" a page (for lack of a better word), as shown in the screenshot below, to see "what's behind", similar to the iPad or iPhone.

我注意到某些网页已禁用,例如gmail和新标签页。

I've noticed that some pages have it disabled, like gmail and the "new tab" page.

如何禁用过度滚动?是否有其他方法可以控制过度滚动?

How can I disable "overscrolling"? Are there other ways in which I can control "overscrolling"?

推荐答案

接受的解决方案不适用于我。我仍然可以滚动的唯一方法是工作,但是:

The accepted solution was not working for me. The only way I got it working while still being able to scroll is:

html {
    overflow: hidden;
    height: 100%;
}

body {
    height: 100%;
    overflow: auto;
}

这篇关于防止“过度滚动”的网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆