/*Galaxy S5 landscape & portrait*/
@media screen
and (device-width: 360px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 3) {
}
/*iphone 4 注意iphone5/SE的width是一样的 screen-width:320px*/
@media (device-height:480px) and (-webkit-min-device-pixel-ratio:2){
}
/*兼容iphone5 screen-width:360px*/
@media (device-height:568px) and (-webkit-min-device-pixel-ratio:2){
}
/*iphone 6/7/8 screen-width:375px*/
@media (min-device-width : 375px) and (max-device-width : 667px) and (-webkit-min-device-pixel-ratio : 2){
}
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3){
/*iphoneX*/
}
/*iphone 6plus screen-width:414px*/
@media (min-device-width : 414px) and (max-device-width : 736px) and (-webkit-min-device-pixel-ratio : 3){
}
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait){
/*ipad等中等设备*/
}
移动端@media自适应常用机型
最新推荐文章于 2025-05-23 11:12:45 发布