我在相關的問題部分找不到類似的問題,所以想通過我試試我的運氣。CSS在所有瀏覽器中的屏幕中心位置圖像,但IE瀏覽器
我正在設計一個頁面,加載時間明顯足夠長,以便加載圖標可以出現。目前,我已將其設置爲使圖標顯示在屏幕中央,在頁面加載完成之前在頁面上顯示半透明疊加層。下面是我使用
<style type="text/css">
#overLayBackground{
background-color: rgb(250, 250, 250);
opacity: 0.7; /* Safari, Opera */
-moz-opacity:0.25; /* FireFox */
filter: alpha(opacity=70); /* IE */
z-index: 200;
height: 100%;
width: 100%;
background-repeat:repeat;
position:fixed;
top: 0px;
left: 0px;
text-align:center;
line-height: 240px;
}
#overLayBackground>img {
position:absolute; bottom:0; top:0; left:0; right:0; margin:auto;
}
<div id="overLayBackground">
<img src="www.example.com/images/loading.gif" title="Image" alt="The image" />
</div>
現在這個工程在Firefox和Chrome預期的代碼,但IE瀏覽器在左上角顯示的圖標。有沒有辦法讓它像其他瀏覽器一樣運行,並將它放置在屏幕的中心?
在此先感謝。
這是什麼告訴我們關於IE? – Rob 2010-03-25 20:08:45