iOS Scrollbar Frustrations: Troubleshooting Overflow CSS
Developing for an iPad website, you stumbled upon an unexpected issue: CSS overflow properties (overflow: auto or scroll) fail to display scrollbars despite enabling two-finger scrolling. This quirk is exclusive to iOS devices.
Addressing the Issue:
Updated Fix (iOS 5beta and Onward):
As pointed out by kritzikratzi, a new property introduced in iOS 5beta (-webkit-overflow-scrolling: touch) can resolve this issue, triggering the expected scrolling behavior.
Original Remedy (iOS 5 and Below):
Unfortunately, neither overflow: auto nor scroll generates scrollbars on iOS devices due to the limited screen space. Instead, the two-finger swipe mechanism is the designated method for scrolling overflowing content.
Alternatives:
Example using @media queries:
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3