iPhone X,XS,XSMax,XR的兼容问题

设备型号 devicePixelRatio screen.width screen.height 图片选择@3x/2X
X/XS 3 375 812 @3x
XSMax 3 414 896 @3x
XR 2 414 896 @2x

css兼容:(用媒体查询方式)

@media only screen and (device-width: 375px) and (device-height:812px) and (-webkit-device-pixel-ratio:3) {
	.list-choose  .list-choose-footer{
		bottom: pxTorem(22)!important;
	}
}
@media only screen and (device-width: 414px) and (device-height:896px) and (-webkit-device-pixel-ratio:3) {
	.list-choose  .list-choose-footer{
		bottom: pxTorem(22)!important;
	}
}
@media only screen and (device-width: 414px) and (device-height:896px) and (-webkit-device-pixel-ratio:2) {
	.list-choose  .list-choose-footer{
		bottom: pxTorem(22)!important;
	}
}

你可能感兴趣的:(iPhone兼容性)