iPhone14系列safearea、分辨率及媒体查询
特别注意:
iPhone14Pro和iPhone14ProMax的状态栏高度和safeArea顶部安全距离不一致
屏幕尺寸及安全区大小
手机型号 | 尺寸(pt) | 倍数 | 屏幕(px) | 状态栏高度 | 顶部安全距离 | 底部安全距离 |
---|---|---|---|---|---|---|
iPhone14Pro | 393 * 852 | 3 | 1179 * 2556 | 54pt | 59pt | 34pt(竖屏) / 21pt(横屏) |
iPhone14ProMax | 430 * 932 | 3 | 1290 * 2796 | 54pt | 59pt | 34pt(竖屏) / 21pt(横屏) |
iPhone12、iPhone12Pro、iPhone13、iPhone13Pro、iPhone14 | 390 * 844 | 3 | 1170 * 2532 | 47pt | 47pt | 34pt(竖屏) / 21pt(横屏) |
iPhone12ProMax、iPhone13ProMax、iPhone14Plus | 428 * 926 | 3 | 1284 * 2778 | 47pt | 47pt | 34pt(竖屏) / 21pt(横屏) |
iPhone12mini、iPhone13mini | 375 * 812 | 3 | 1125 * 2436 | 50pt | 50pt | 34pt(竖屏) / 21pt(横屏) |
iPhoneXS Max、iPhone11ProMax | 414 * 896 | 3 | 1242 * 2688 | 44pt | 44pt | 34pt(竖屏) / 21pt(横屏) |
iPhoneX、iPhoneXS、iPhone 11 Pro | 375 * 812 | 3 | 1125 * 2436 | 44pt | 44pt | 34pt(竖屏) / 21pt(横屏) |
iPhoneXR、iPhone 11 | 414 * 896 | 2 | 828* 1792 | 48pt | 48pt | 34pt(竖屏) / 21pt(横屏) |
iPhone6 Plus、iPhone6s Plus、iPhone7 Plus、iPhone8 Plus | 414 * 736 | 3 | 1242x2208 | 20pt | 20pt | --- |
iPhone6、iPhone6s、iPhone7、iPhone8、iPhoneSE2、iPhoneSE3 | 375 * 667 | 2 | 750 * 1334 | 20pt | 20pt | --- |
iPhone 14
For iPhone 12, iPhone 12 Pro, iPhone 13, iPhone 13 Pro, and iPhone 14:
/* 1170×2532 pixels at 460ppi */
@media only screen
and (width: 390px)
and (height: 844px)
and (-webkit-device-pixel-ratio: 3) { }
iPhone 14 Plus
For iPhone 12 Pro Max, iPhone 13 Pro Max, and iPhone 14 Plus:
/* 1284×2778 pixels at 458ppi */
@media only screen
and (width: 428px)
and (height: 926px)
and (-webkit-device-pixel-ratio: 3) { }
iPhone 14 Pro
Unique to iPhone 14 Pro:
/* 1179×2556 pixels at 460ppi */
@media only screen
and (width: 393px)
and (height: 852px)
and (-webkit-device-pixel-ratio: 3) { }
iPhone 14 Pro Max
Unique to iPhone 14 Pro Max:
/* 1284×2778 pixels at 460ppi */ @media only screen and (width: 430px) and (height: 932px) and (-webkit-device-pixel-ratio: 3) { }
用心写代码,不辜负程序员之名。