简体   繁体   中英

Android scrolling inside HTML containers, which has a CSS overflow property

I have a container on a page, which has has a huge overflow-x. On a iPad, the user can simple swipe-scroll left, just like they would do vertically when scrolling down the page.

On a PC, scrollbars are visible so the user can scroll left and right.

However, on the Android, no scroll bars appear and I can't swipe left like I can on the iPad.

Is some special CSS and JS needed here? Does anyone know why this happens?

The overflow property is not working properly in Android devices before Android 3.0. But it is solved from the Android 3.0 or later.

I also had this issue while I was developing an application.

This issue was solved by using a button and animating the element's margin-top property so that it is changed to negative value, therefore creating a scroll effect.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM