2016-11-26 86 views
0

我在創建的網站上遇到問題。當您逐頁移動時,導航菜單閃爍,但僅在Chrome和IE中閃爍。導航菜單在頁面間移動時閃爍,僅在Chrome中使用

更奇怪的是,當我在Chrome的icognito窗口中打開它或者在本地加載它時,它不會發生。

這裏是一個活生生的例子 - http://andrewbruce.me

我把下面的代碼 -

導航HTML -

<body> 

<div class="menuButton" onclick="decide(this);"> 
    <div id = "bar1"></div> 
    <div id = "bar2"></div> 
    <div id = "bar3"></div> 
</div> 

<div id ="nav"> 
    <ul> 
     <a href = "home.html"><li>HOME<span style = "float: right; padding-right: 2%;">></span></li><a/> 
     <a href = "portfolio.html"><li>PORTFOLIO<span style = "float: right; padding-right: 2%;">></span></li><a/> 
     <a href = "cv.html"><li>CV<span style = "float: right; padding-right: 2%;>></span></li><a/> 
     <a href = "contact.html"><li>CONTACT<span style = "float: right; padding-right: 2%;">></span></li><a/> 
    </ul> 
</div> 

導航CSS -

#nav { 
    height: 100%; 
    width: 22%; 
    text-align: center; 
    box-shadow: 2px 2px 5px #888888; 
    transition: all .3s ease-in-out; 
    background-color: #1b1d1f; 
    float: left; 
    position: fixed; 
    z-index: 2; 
} 

#nav ul { 
    display: inline-block; 
    margin: 0; 
    padding: 0; 
    list-style: none; 
    width: 100%; 
    line-height: 2; 
    margin-top: 20%; 
} 

#nav a { 
    text-decoration: none; 
} 

#nav li { 
    transition: all .2s ease-in-out; 
    color: white; 
    font-size: 25px; 
    text-align: left; 
    padding-left: 15px; 
} 

回答

0

我已經測試你的在Chrome和Safari瀏覽器的網站,我似乎無法重新創建fl ickering。閃爍可能是由於加載速度和導航欄剛剛加載。基於它只發生在公共服務器上的事實。當你做一個本地測試速度往往是瞬間的,因爲它是直接從文件中提取您的計算機上。

0

我想通了。我有一個安裝Chrome擴展程序這是放慢我的瀏覽器的性能,因此它被裝載在導航欄慢。

因此,它爲什麼在隱身模式下工作,因爲沒有任何擴展正在加載!