【问题标题】:PhoneGap + JQM + iScrollView: Choppy Scrolling with large content within "iscroll-content"PhoneGap + JQM + iScrollView:“iscroll-content”内的大内容滚动不连贯
【发布时间】:2013-09-27 17:30:27
【问题描述】:

我在我的应用程序上使用iScrollView (PhoneGap, JQM 1.3, Android)。在这方面的出色工作。这是一颗宝石。

其实我是在三星 Galaxy S3 上测试的。

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

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

但我注意到的是,当在我的内容 <div> 中省略 data-iscroll 属性时,滚动更加流畅,而且一点也不起伏不定。 但是当向 content-DIV 添加data-iscroll 属性时,滚动是断断续续的。

我认为这是因为锚标签或图像,所以我用跨度替换了 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>

谁能确认这种行为?有解决办法吗?

【问题讨论】:

    标签: jquery-mobile cordova iscrollview


    【解决方案1】:

    好的,终于从 Jon Tara 本人那里得到了答案。 iScrollView 绝对仅适用于标记较小且不复杂的 WebView。 阅读here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-06-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多