Home > Web Front-end > CSS Tutorial > How to Disable Overscrolling on macOS Chrome?

How to Disable Overscrolling on macOS Chrome?

Mary-Kate Olsen
Release: 2024-11-02 16:47:29
Original
1049 people have browsed it

How to Disable Overscrolling on macOS Chrome?

Overcoming Web Page Overscrolling on macOS Chrome

Overscrolling, a phenomenon akin to peering beyond the visible horizon of a web page, occurs in Chrome for Mac. This ability to gain insights into what lies beyond the page's boundaries is similar to that found on mobile devices like iPads or iPhones.

Some web pages, such as Gmail and the "new tab" page, intentionally disable this overscrolling behavior. If you're seeking a way to control or disable overscrolling, consider the following approach:

The initially proposed solution failed to address the issue effectively. However, an alternative CSS snippet achieves the desired result while preserving essential scrolling functionality:

<code class="css">html {
    overflow: hidden;
    height: 100%;
}

body {
    height: 100%;
    overflow: auto;
}</code>
Copy after login

With this implementation, overscrolling is disabled, preventing users from extending the page's boundaries. Note that this method works by restricting overall overflow while enabling controlled scrolling within the page's designated area.

The above is the detailed content of How to Disable Overscrolling on macOS Chrome?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template