您的位置:首页 > Web前端 > CSS

css3@media 兼容ios4,ios5,ios6,6plus

2017-07-07 13:05 204 查看
//device-height  设备可视高度
//-webkit-min-device-pixel-ratio    是设备上物理像素和设备独立像素,设备像素比率

@media (device-height:480px) and (-webkit-min-device-pixel-ratio:2) {
/* 兼容iphone4/4s */
html{}
}
@media (max-device-width:621px) and (-webkit-min-device-pixel-ratio:3) {
/* 兼容iphone6p */
html{}
}
@media (device-height:667px) and (-webkit-min-device-pixel-ratio:2) {
/* 兼容iphone6 */
html{}
}

/*魅族*/
@media only screen and (min-device-width :1080px) and (-webkit-min-device-pixel-ratio : 2.5){ }

/*mate7*/
@media only screen and (min-device-width :1080px) and (-webkit-min-device-pixel-ratio : 3){ }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: