0
我有我的網頁超級簡單的加載覆蓋:加載覆蓋並不在Chrome中工作,在IE/Firefox的工作
<script type="text/javascript">
$(window).load(function(){
$("#loading").fadeOut();
})
</script>
...
...
<body>
<div id="loading">
<div id="loadingimage"><img src="../pictures/loading.gif"></div>
</div>
...
...
</body>
#loading {
height:100%;
width:100%;
position:fixed;
background-color: rgba(0,0,0,0.7);
filter:alpha(opacity = 80);
z-index:9999;
top:0;
bottom:0;
}
#loadingimage {
position:fixed;
height:100px;
width:100px;
top:50%; //center it
margin-top:-50px;
left:50%;
margin-left:-50px;
}
這在Firefox/IE,半透明的黑色覆蓋和精細加載圖片會在網頁加載時淡出,但在Chrome中加載div永遠不會淡出(overlay +圖片),它只會永遠掛在那裏。鼠標圖標也卡在「加載」圖標中。我的網站上只有一大堆圖片和文字,沒有辦法像加載一小時(這是我等待的時間),所以它必須在代碼上出現問題。
Chrome是否不支持「$(窗口).load(函數()」什麼?這是第一次IE實際上做正確的事和Chrome不... O_O