[英]Resize background Image different desktop screen size
Background image does not resize on different desktop screens with the following style. 背景图像在具有以下样式的其他桌面屏幕上不会调整大小。 What's wrong here?
怎么了
@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) {}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.