我正在测试一个用 jQuery Mobile 1.1.0 构建的移动网络应用程序。我正在使用在 android 4.0 上运行的 Galaxy Nexus 测试网站应用程序。 CSS 滑动过渡时出现令人讨厌的闪烁,我四处寻找修复方法并发现了这一点:
.ui-page {
-webkit-backface-visibility: hidden;
}
但是,当我使用此修复程序时,不显示具有 ListView 的索引页。请帮我。可能是什么问题?
最佳答案
防止“闪烁”的唯一真正方法是完全禁用 jQuery Mobile 页面转换。在您的文档中,放置以下代码:
// load your custom jQuery Mobile Defaults
<script type="text/javascript" src="mobile/js/mobile-site-custom-jqm-defaults.js"></script>
// load jQuery Mobile
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
// load your scripts.js (your javascript & functions, etc.)
<script type="text/javascript" src="mobile/js/script.js"></script>
要禁用转换,请在 mobile-site-custom-jqm-defaults.js 文件中放置以下代码:
$(document).bind("mobileinit", function(){
$.extend( $.mobile , {
defaultPageTransition: 'none'
});
});
关于android - 转换期间 jQuery Mobile 屏幕闪烁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11029427/