2015-01-14 69 views
0

我的問題在於,我的背景幾乎在所有瀏覽器中加載完美,除了IE8及以下版本。 該頁面可以在這裏看到:http://www.glnyrupvej.co.nf/ 這裏是頁面的IE8截圖:Page in IE8CSS背景未顯示IE 8及更早版本

這裏是我的CSS:

height: 700px; 
padding-top: 50px; 
background: url(images/fraluften.png) no-repeat center center fixed; 
-webkit-background-size: cover; 
-moz-background-size: cover; 
-o-background-size: cover; 
background-size: cover; 

是的,我也知道有這樣的其他問題,但他們都不能幫助我。

這可能是超級基礎,我只是忽略了,所以答案是讚賞! (:

+0

http://css-tricks.com/perfect-full-page-background-image/ –

+0

,如果它不是來自客戶端的嚴格要求,不要試圖讓網站與IE兼容拿破崙版(IE8-)。 IE8在2014年春天隨Windows XP去世(感謝上帝!)。大多數開發人員/公司不再支持它,用戶應永遠不要使用9之前的版本,因爲根本沒有更新(安全或其他)被MS發佈。 – giorgio

+0

@abhijith,無用的評論...你的教程從字面上說「適用於:IE9 +」 –

回答

0

背景大小:蓋;CSS3屬性,因此它會不是IE8工作或更早versions.Better嘗試使用它圖像標籤這樣實現的:

你的頭的HTML代碼

<header> 
      <center> 
    <img src="images/fraluften.png" class="backgroundClass"> 
<img src="images/scrolldownB.png" id="scrolldownB" style="display: inline;"> 
      </center> 
      </header> 

CSS的backgroundClass

.backgroundClass{ 
    display: inline; 
    height: 700px; 
     position: fixed; 
     top: 0; 
    width: 100%; 
    left: 0; 
    z-index: -1; 
    } 
+0

我想這是一樣好。這絕對不是與background-size:cover相同的效果,但至少現在我的圖片出現了。 感謝哥們。 – metadog