@media属性针对苹果手机写法
@media (device-height:480px) and (-webkit-min-device-pixel-ratio:2){
.class{}/* 兼容iphone4/4s */
}
@media (device-height:568px) and (-webkit-min-device-pixel-ratio:2){
.class{}/* 兼容iphone5 */
}
@media (device-width:375px) and (-webkit-min-device-pixel-ratio:2){
.class{}/* 兼容iphone 6 */
}
@media (device-width:414px) and (-webkit-min-device-pixel-ratio:3.0){
.class{}/* 兼容iphone6 plus */
}
转载,非常感谢原博主cc蒲公英提供的解决方法,原文:https://blog.csdn.net/cddcj/article/details/52472538?utm_source=copy