css, ios, iPad, -webkit-overflow-scrolling: touch bug, large content gets cut off

﹥>﹥吖頭↗ 提交于 2019-12-08 08:39:12

问题


I have a table with thousands of rows (2317 to be precise) with data coming from the database. I am putting this table inside a div so it is scrollable.

html:

<div class="longList">
  <!-- table with thousands of rows -->
</div>

css:

.longList {overflow: auto; height: 550px; margin: 0 auto; -webkit-overflow-scrolling: touch;}

The problem is, the list is cutting off on mobile safari on the iPad (on desktop browsers it works fine) at row number 1900 (half of that row is shown) and the rest of the list is showing up as blank. The rows are not showing up after the 1900th row.

All rows shows up if I remove '-webkit-overflow-scrolling: touch;' from the styles.

Has anyone come across this or has any idea how to fix this?


回答1:


Adding position:fixed resolved this issue but a different problem started with that, but that's another story (see -webkit-overflow-scrolling: touch, large content gets cut off when specifying a width).

.longList {overflow: auto; height: 550px; margin: 0 auto; -webkit-overflow-scrolling: touch; position:fixed; }


来源:https://stackoverflow.com/questions/17581794/css-ios-ipad-webkit-overflow-scrolling-touch-bug-large-content-gets-cut-of

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!