PhoneGap + JQM + iScrollView:在“iscroll-content”中具有大量内容的断断续续的



我在我的应用程序上使用iScrollView ( PhoneGap, JQM 1.3, Android (。在这方面做得很好。这是一颗宝石。

实际上,我正在三星Galaxy S3上进行测试。

我的第一页垂直尺寸很大(大约 6000 像素(,由一堆带有图像的<div>容器(带有外部 src(组成。

这些 DIV - 容器基于 Json 数据动态添加到内容div 中。然后我正在做一个refresh.到目前为止一切都很好。

但我注意到的是,当我的内容<div>中省略 data-iscroll 属性时,滚动要流畅得多,而且一点也不断断续续。但是,当将data-iscroll属性添加到内容DIV时,滚动是断断续续的。

我认为这是因为锚标签或图像,所以我用跨度替换了div 容器并在其中添加了一些文本。我复制了大约 30 个跨度并观察滚动的行为。它是断断续续的 - 即使有跨度。然后我只花了 15 个跨度,滚动更流畅一些。它与 content-div 中的容器数量有关。

我的标记看起来更简化,如下所示:

<div data-role="content" data-iscroll class="iscroll-wrapper">
    <div class="iscroll-scroller">
        <div class="iscroll-content">
          <p>This is some content that I want to scroll</p>
          <p>This is some content that I want to scroll</p>
          <p>This is some content that I want to scroll</p>
          <p>This is some content that I want to scroll</p>
          <p>This is some content that I want to scroll</p>
          <p>This is some content that I want to scroll</p>
          <p>This is some more content</p>
          ... more content up to 6000px in vertical direction
        </div>
    </div>
</div>

谁能证实这种行为?是否有可用的解决方法?

好吧,终于从乔恩·塔拉本人那里得到了答案。iScrollView绝对仅适用于具有小标记且不复杂标记的Web视图。在这里阅读

最新更新