背景图片不会在具有以下样式的不同桌面屏幕上调整大小。这有什么不对?
@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;
}
}
答案 0 :(得分:0)
尝试使用此规则:
@media only screen and (min-resolution: 72dpi) and (min-device-width: 539px) {}