Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/421.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript phonegap iOS页面间白色闪烁/闪烁_Javascript_Ios_Xcode_Cordova - Fatal编程技术网

Javascript phonegap iOS页面间白色闪烁/闪烁

Javascript phonegap iOS页面间白色闪烁/闪烁,javascript,ios,xcode,cordova,Javascript,Ios,Xcode,Cordova,我正在为我的iOS应用程序使用phonegap 由于某些原因,当我浏览我的应用程序时,页面之间会有一瞬间的白色闪烁/闪烁 我没有使用jquery mobile,我只使用了一些javascripts和iScroll4,仅此而已。有没有办法解决这个问题 编辑这里是代码的一部分 索引CSS: body { -webkit-user-select: none; -webkit-touch-callout: none; background-color: #f7f6ec; overflow-y: s

我正在为我的iOS应用程序使用phonegap

由于某些原因,当我浏览我的应用程序时,页面之间会有一瞬间的白色闪烁/闪烁

我没有使用jquery mobile,我只使用了一些javascripts和iScroll4,仅此而已。有没有办法解决这个问题

编辑这里是代码的一部分

索引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>

有很多可能的原因。
也许你可以将css中具有闪烁效果的元素更改为rgba0、0、0、0。

谢谢你的回复!我试过了,但是没用,页面之间还是有闪光。我已经在我的index.css正文中添加了一些代码,让每个人都能理解你所做的事情!编辑了我的帖子。每当dom更改时,您都会调用加载函数,该函数在超时后调用myScroll.refresh。如何处理页面间点击链接的操作?对不起,我是编程新手,我不太懂。我在html部分编辑了更多内容。我只是通过正常链接链接页面,例如我的about页面只包含HTML/CSS代码,在我的主页和about页面之间仍然有闪烁/闪烁。