In Chrome for Mac, "overscrolling" is an undesirable effect that allows users to drag a page beyond its normal viewing area, as seen in the image provided. To address this issue and improve user experience, consider the following two methods:
If you want to entirely disable overscrolling, employ the following CSS code:
html { overflow: hidden; height: 100%; } body { height: 100%; overflow: auto; }
The overflow: hidden property on the <html> element prevents any overflow content from becoming visible, effectively bounding the page within its viewport. The overflow: auto property on the <body> element allows natural scrolling within the page's designated height, but restricts overscrolling.
To customize and control overscrolling behavior, utilize the touch-action property:
body { -webkit-touch-callout: none; -webkit-touch-action: manipulation; }
The code above prevents text selection while allowing general touch manipulation, including scrolling within the page's defined height. For more granular control, you can specify precise touch-action values, such as pan-x to allow only horizontal scrolling.
अस्वीकरण: उपलब्ध कराए गए सभी संसाधन आंशिक रूप से इंटरनेट से हैं। यदि आपके कॉपीराइट या अन्य अधिकारों और हितों का कोई उल्लंघन होता है, तो कृपया विस्तृत कारण बताएं और कॉपीराइट या अधिकारों और हितों का प्रमाण प्रदान करें और फिर इसे ईमेल पर भेजें: [email protected] हम इसे आपके लिए यथाशीघ्र संभालेंगे।
Copyright© 2022 湘ICP备2022001581号-3