iPhone jQuery手机闪烁问题 [英] iphone jquery mobile flickering issue
问题描述
使用jQuery mobile开发的应用程序在iPhone上面临闪烁的问题. 我尝试了几种Internet上可用的解决方案,包括CSS更改,将过渡设置为无",甚至在jquerymobile.js中添加注释代码.但是没有运气... 我正在使用的JS和CSS文件如下:
I am facing flickering issue on iPhone with an app developed using jQuery mobile. I have tried several solutions available on the internet including CSS changes, setting transitions to "none" and even commenting code in jquerymobile.js. But no luck... JS and CSS files I am using are below:
<script src="jquery-1.7.1.min.js"></script>
<script src="jquery.mobile-1.1.0.js"></script>
<script type="text/javascript" charset="utf-8" src="cordova-2.3.0.js"></script>
<link rel="stylesheet" href="jquery.mobile.structure-1.1.0.min.css" />
在此方面的任何帮助将不胜感激.谢谢.
Any help on this will be greatly appreciated. Thanks.
推荐答案
当我在过渡期间搜索闪烁的 header 和 footer 时,我发现该SO线程为以及: http://view.jquerymobile.com/1.3.1/dist/demos/widgets/fixed-toolbars/footer-persist-a.html
While I was searching for flickering header and footer during transitions I've found this SO thread as well as: http://view.jquerymobile.com/1.3.1/dist/demos/widgets/fixed-toolbars/footer-persist-a.html
就这么简单:如果您要导航的页面具有标题或 具有与您要浏览的页面相同的数据ID的页脚, 工具栏将在过渡之外固定显示.
It's that simple: If the page you're navigating to has a header or footer with the same data-id as the page you're navigating from, the toolbars will appear fixed outside of the transition.
<div id="sell" data-role="page" >
<div data-role="header" data-id="header" data-position="fixed">
<h1>Seconds.me</h1>
<a data-role="button" href="#buy" data-icon="arrow-l" data-theme="app-ios" style="color: white; text-decoration: none;">Back</a>
</div>
<h3>1</h3>
<a href="#buy">2</a>
</div>
<div id="buy" data-role="page" >
<div data-role="header" data-id="header" data-position="fixed">
<h1>Seconds.me</h1>
<a data-role="button" href="#sell" data-icon="arrow-l" data-theme="app-ios" style="color: white; text-decoration: none;">Back</a>
</div>
<h3>2</h3>
<a href="#sell">1</a>
</div>
闪烁,现在不闪烁.参见data-id="header"
,这两个页面都相同.
Was flickering, now flickers it not. See data-id="header"
which the same for both pages.
(希望有所帮助)
更新: http://jquerymobile.com/demos/1.2.0/docs/pages/page-transitions.html ->此页面还解决了闪烁问题...
UPDATE: http://jquerymobile.com/demos/1.2.0/docs/pages/page-transitions.html --> this page also tackles flickering...
这篇关于iPhone jQuery手机闪烁问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!