2012-09-18 19 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