2014-06-30 132 views
1

我注意到我的標題的背景圖片在ie6上完全沒有顯示。見http://goo.gl/YbW2xbie6上沒有顯示的標題背景圖片

不想讓我的網站看起來完美的ie6,但有沒有一個快速解決這個問題?

非常感謝,

CSS:

header { 
position: relative; 
    width: 100%; 
    height: 600px; 
    margin-right: auto; 
    margin-left: auto; 
    background-size: 100% 100%, cover; 
    background-color: rgb(222, 222, 222); 
} 

.wrapper-3 header { 
    background-image: -webkit-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image: -moz-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image:  -o-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image:  -ms-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image:   linear-gradient(359deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-position: 0% 0%, center center; 
    opacity: 0.95; 
} 

HTML

<div class="wrapper wrapper-3 clearfix"> 
    <header class="clearfix"> 
</header> 
</div> 
+0

爲IE6瀏覽器寫一個條件語句。 –

回答

0

嘗試。用這個替換你的css。 add

.wrapper-3 header { 
    background-image:url('../images/.jpg'); /*add this for IE*/ 

    background-image: -webkit-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image: -moz-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image:  -o-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image:  -ms-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image:   linear-gradient(359deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-position: 0% 0%, center center; 
    opacity: 0.95; 
} 
1

由於IE 6不支持多個背景,所以簡單的回退應該起作用?

您有沒有文件名稱爲您的圖像,不知道這是有意!

.wrapper-3 header { 
    background-image: url('../images/.jpg'); /* fallback */ 
    background-image: -webkit-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image: -moz-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image:  -o-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image:  -ms-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-image:   linear-gradient(359deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg'); 
    background-position: 0% 0%, center center; 
    opacity: 0.95; 
}