2012-09-18 20 views
1

我有一個網站,使用DIV作爲背景(如反對把它的身體,我需要正確居中) 這裏IM是網站,http://asystec.hailstormcommerce.com/媒體僅屏幕不加載新的背景

這裏是CSS:

@media only screen 
and (min-device-width : 320px) 
and (max-device-width : 480px) { 
.backgroundwrapper { 
background-image: url('images/asystec-mobile-bg.jpg'); 
background-position:center 188px; 
     } 

} 

.backgroundwrapper { 
background: #fff url('images/pageBgOld.jpg') no-repeat; 
background-position:center 188px; 
height:1903px; 
width:1903px; 

} 

伊夫試圖在瀏覽器中清除緩存,但它肯定是載入pageBgOld圖像作爲反對新的。 任何幫助將是偉大的。

回答

2

媒體查詢後您的主要風格。這樣寫:

.backgroundwrapper { 
background: #fff url('images/pageBgOld.jpg') no-repeat; 
background-position:center 188px; 
height:1903px; 
width:1903px; 

} 
@media only screen 
and (min-device-width : 320px) 
and (max-device-width : 480px) { 
.backgroundwrapper { 
background-image: url('images/asystec-mobile-bg.jpg'); 
background-position:center 188px; 
     } 

} 
+0

非常感謝你,完美的工作 – Adrian