iPhone CSS media query(媒体查询)

iPhone5 ?iPhone6 ?iPhone6Plus iPad设备 media query媒体查询)代码.

iPhone-CSS-media-query

 

PS:需要注意的是iPhone5不具有16:9的纵横比。事实上,它是40:71。

iPhone < 5:

@media screen and (device-aspect-ratio: 2/3) {}

 

iPhone 5:

@media screen and (device-aspect-ratio: 40/71) {}

 

iPhone 6:

@media screen and (device-aspect-ratio: 667/375) {}

 

iPhone 6Plus:

@media screen and (device-aspect-ratio: 16/9) {}

 

iPad:

@media screen and (device-aspect-ratio: 3/4) {}

 

参考:Media Queries @ W3C ? ? ??iPhone Model Comparison ? ? ?Aspect Ratio Calculator