Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.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_Media Queries - Fatal编程技术网

Css 调整背景图像大小不同的桌面屏幕大小

Css 调整背景图像大小不同的桌面屏幕大小,css,media-queries,Css,Media Queries,背景图像不会在具有以下样式的不同桌面屏幕上调整大小。这里怎么了 @media only screen and (min-resolution: 2dppx) and (min-device-width: 539px) { /* Large screen, retina */ .welcome { background:#00ff00; /* link to other image */ background-image: url('

背景图像不会在具有以下样式的不同桌面屏幕上调整大小。这里怎么了

@media
only screen and (min-resolution: 2dppx) and (min-device-width: 539px) {
    /* Large screen, retina */
    .welcome {
        background:#00ff00;
        /* link to other image */
        background-image: url('Desktop768px1024px.jpg');
        background-size: 100% 100%;
        /* hide src */
        height:0;
        width:0;

        /* just show the background */
        padding:768px 1024px;
    }
}
请尝试使用此规则:

@media only screen and (min-resolution: 72dpi) and (min-device-width: 539px) {}

dppx
px
在同一个目标上,看起来很奇怪……)你在用什么设备测试?