![](/img/trans.png)
[英]how to to kill the white flickering splashscreen at the start of phonegap iOS app?
[英]White flickering/flash between pages in phonegap iOS
我正在为我的iOS应用程序使用phonegap。
出于某种原因,当我浏览我的应用程序时,页面之间有一瞬间的白色闪烁/闪烁。
我没有使用jquery mobile,仅使用了一些javascript和iScroll4。 反正有解决这个问题的方法吗?
EDITED
这是代码的一部分。
索引CSS:
body {
-webkit-user-select: none;
-webkit-touch-callout: none;
background-color: #f7f6ec;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
#fixedcontent {
position:absolute; z-index:1;
top:64px; bottom:49px; left:0;
width:100%;
overflow:auto;
}
的index.html
<html>
<head>
<script type="text/javascript" src="cordova.js"></script>
<link rel="stylesheet" type="text/css" href="css/index.css" />
<!-- fixed header -->
<script src="js/iscroll-lite.js"></script>
<script type="text/javascript">
var myScroll;
function loaded() {
setTimeout(function () {
myScroll = new iScroll('fixedcontent');
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
document.addEventListener('DOMContentLoaded', loaded, false);
function onCompletion () {
// Here modify the DOM in any way, eg: by adding LIs to the scroller UL
setTimeout(function () {
myScroll.refresh();
}, 0);
};
</script>
</head>
<body>
<div id="wrappercontentfixed"> hi test
<a href="about.html"> about page </a>
<a href="merchandise.html"> merchandise page</a>
</div>
</body>
</html>
这有很多可能的原因。 也许这是webkit-tap-highlight-color,您可以将具有闪烁效果的元素的css更改为rgba(0, 0, 0, 0)
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.