Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 仅媒体屏幕不加载新背景_Css_Mobile_Background - Fatal编程技术网

Css 仅媒体屏幕不加载新背景

Css 仅媒体屏幕不加载新背景,css,mobile,background,Css,Mobile,Background,我有一个网站,我使用一个div作为背景(与将其放在身体中相反,因为我需要将其正确居中) 这里是网站 以下是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 188p

我有一个网站,我使用一个div作为背景(与将其放在身体中相反,因为我需要将其正确居中) 这里是网站

以下是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图像,而不是新图像。
任何帮助都会很好。

根据您的主要风格编写媒体查询。这样写:

.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;
        }

}