【问题标题】:jQuery mobile not scrolling on chrome but scrolling on firefox (android and vice versa on desktop)jQuery mobile 不在 chrome 上滚动,而是在 firefox 上滚动(桌面上的 android 和反之亦然)
【发布时间】:2015-01-29 11:44:19
【问题描述】:

我有一个错误,我无法追踪它出现的原因。我正在使用 jQuery mobile(版本 1.4.5 和 jQuery 1.11.1)制作一个网络移动应用程序,出于某种原因,我遇到了以下问题:

在桌面(Linux)上:

Chrome v.40 滚动当前页面 - 工作

Firefox 35.0.1 滚动当前页面 - 不工作

移动浏览器(Android 4.2 和 Android 5.0.1):

Firefox(34.0.1) - 上下滑动页面工作

Chrome(v40.0.2214.89) - 无法上下滑动页面。

这是我的代码:

<body class="ui-body">

<!-- MAIN PAGE -->
    <div data-role="page" id="main-page">

    <!-- ABOUT PANEL -->
        <div data-role="panel" id="about-page" data-position="right">
                <h3> About </h3>
                <p> Lorem ipsum dolor sit amet.</p>
                <button id="tst" class="ui-btn"> Do things. </button>

        </div>
    <!-- END ABOUT PANEL -->

    <!-- HEADER -->
        <div data-role="header">
            <a href="#login" id="login" class="ui-btn ui-corner-all ui-icon-lock" data-transition="pop">Login</a>
            <h2> AZMO mobile </h2>
        </div>
    <!-- END HEADER --> 
    <!-- MAIN CONTENT -->
        <div data-role="main" class="ui-content" id="content">

            <ul id="postlist" data-role="listview" data-inset="true">
                <!-- the content here is generated with jQuery -->
            </ul>

        </div>

    <!-- END MAIN CONTENT -->
    <!-- FOOTER -->
        <div data-role="footer">
            <h3> Footwe main </h3>
        </div>
    <!-- END FOOTER -->     
    </div>
<!-- END MAIN PAGE -->
    <div data-role="page" id="single-page" data-add-back-btn="true">
        <div data-role="header">
            <a href="#main-page" data-rel="back" class="ui-btn ui-corner-all ui-icon-arrow-l ui-btn-icon-notext">Back</a>
            <h2 id="single-post-title"> </h2>
        </div>

        <div data-role="main" class="ui-content" id="single-page-content" data-inset="true">
            <!-- post content is generated with jQuery -->
        </div>

        <div data-role="footer">
            <h2> footer text </h2>
        </div>

    </div>
</body>

【问题讨论】:

    标签: android google-chrome firefox jquery-mobile


    【解决方案1】:

    奇怪的是,当我添加时

    <body class="ui-mobile-viewport ui-overlay-c">
    

    <html class="ui-mobile">
    

    一切顺利。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-30
      • 2020-10-11
      相关资源
      最近更新 更多