通过以下内容,我想使用更大的背景图像进行双密度显示。但是,支持媒体查询的设备会只下载较大的图像还是两者都下载?
.logo {
background: url('logo.jpg');
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
only screen and ( min-resolution: 2dppx) {
.logo {
background: url('logo-double-density.jpg');
background-size: 40px 40px; //size is half of the actual image
}
}