ios的媒体查询

ios4的高度是480px,

5的高度是568px,

6的高度是667px,

6 plus的高度是736px。

因为实际页面中,导航栏,statusbar会占用整个屏幕高度。

所以,进行媒体查询适配,我是这样来的:

/*iphone 4*/
@media screen and (min-height: 400px) and (max-height: 500px) {
}
/*iphone 5*/
@media screen and (min-height: 501px) and (max-height: 580px) {
}
/*中屏安卓*/
@media screen and (min-height: 581px) and (max-height: 630px) {
}
/*iphone 6*/
@media screen and (min-height: 630px) and (max-height: 700px) {

}
/*iphone 6 plus*/
@media screen and (min-height: 701px) and (max-height: 760px) {

}

这是以屏幕screen分辨率来搞。

posted @ 2015-06-15 21:23  草珊瑚  阅读(804)  评论(0)    收藏  举报