【问题标题】:css, ios, iPad, -webkit-overflow-scrolling: touch bug, large content gets cut offcss、ios、iPad、-webkit-overflow-scrolling:触摸错误,大内容被截断
【发布时间】:2013-07-09 00:59:17
【问题描述】:

我有一个包含数千行(准确地说是 2317 行)的表,其中的数据来自数据库。我把这张表放在一个 div 里面,所以它是可滚动的。

html:

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

css:

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

问题是,列表在第 1900 行(显示该行的一半)处截断 iPad 上的移动 Safari(在桌面浏览器上工作正常),其余的列表显示为空白。第 1900 行之后的行未显示。

如果我删除“-webkit-overflow-scrolling: touch;”,所有行都会显示从样式。

有没有人遇到过这个问题或者知道如何解决这个问题?

【问题讨论】:

    标签: ios css jquery-mobile mobile-safari


    【解决方案1】:

    添加 position:fixed 解决了这个问题,但另一个问题由此开始,但那是另一回事(参见 -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; }
    

    【讨论】:

      猜你喜欢
      • 2013-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-12
      • 1970-01-01
      • 1970-01-01
      • 2012-02-04
      • 2014-03-09
      相关资源
      最近更新 更多