@media (device-height:480px) and (-webkit-min-device-pixel-ratio:2){/* 兼容iphone4/4s */ .class{} } @media (device-height:568px) and (-webkit-min-device-pixel-ratio:2){/* 兼容iphone5 */ .class{} } @media(min-device-375px)and(max-device-667px)and(-webkit-min-device-pixel-ratio:2){ /*iphone6*/ } @media(min-device-414px)and(max-device-736px)and(-webkit-min-device-pixel-ratio:3){ /*iphone6plus*/ }