2014-02-12 38 views
1

我使用這些CSS命令:回退的背景屬性@media CSS功能

@media all and (max-width:1050px) { 
body { 
    background:#90a830 url(img/bg.png) no-repeat left top; 
    background-position:-481px 0; 
} 
} 
@media not all and (max-width:1050px) { 
body { 
background:#90a830 url(img/bg.png) no-repeat center top; 
} 
} 
body { 
line-height:1; 
margin:0px auto; 
padding:0px; 
-webkit-font-smoothing: antialiased; 
-moz-font-smoothing: antialiased; 
-o-font-smoothing: antialiased; 
font-smoothing: antialiased; 
font-family: 'roboto_condensedregular'; 
} 

這讓我有不同的屏幕寬度的2點不同背景的設置,但是....

在老瀏覽器的背景是空白的,我猜測它是因爲舊版瀏覽器無法查看媒體標籤。

我的問題是,我如何做一箇舊版瀏覽器的回退,所以如果任何瀏覽器不支持媒體標籤它仍然回落在其他一些CSS顯示背景?

感謝

回答

3

設置備用background風格第一,然後覆蓋他們每個屏幕尺寸

+0

是工作十分感謝 – biGGsy