@media媒体查询判断iPhone各版本
/*iPhone5和iPhone SE*/ @media only screen and (device-width : 320px) and (device-height : 568px) and (-webkit-device-pixel-ratio : 2) { /*code*/ } /* iPhone6/7/8 */ @media only screen and (device-width : 375px) and (device-height : 667px) and (-webkit-device-pixel-ratio : 2) { /*code*/ } /* iPhone6/7/8 Plus*/ @media only screen and (device-width : 414px) and (device-height : 736px) and (-webkit-device-pixel-ratio : 3) { /*code*/ } /* iPhoneX*/ @media only screen and (device-width : 375px) and (device-height : 812px) and (-webkit-device-pixel-ratio : 3) { /*code*/ }