iphoneX、iPhone12尺寸
1、iPhone 12:2532 x 1170像素分辨率,460 PPI ; 844 * 390;devicePixelRatio:3
2、iPhone 12 mini:2340 x 1080 像素分辨率,476 PPI ;812 * 375;devicePixelRatio:3
3、iPhone 12 Pro:2532 x 1170 像素分辨率,460 PPI ;844 * 390;devicePixelRatio:3 6.1 英寸
4、iPhone 12 Pro Max:2778 x 1284 像素分辨率,458 PPI ;926 *428;devicePixelRatio:3 6.7英寸
5、iPhone X、iPhone XS、iPhone 12 mini: 2436 x 1125 像素分辨率,458 ppi 812 * 375 3倍图
6、iPhone XS Max: 2688 x 1242 像素分辨率,458 ppi 414896 3倍图
7、iPhone XR: 1792 x 828 像素分辨率,326 ppi 414896 2倍图
8、iphone11 pro Max : 2688 x 1242 像素分辨率,458 ppi
9、iphone11 pro:2436 x 1125 像素分辨率,458 ppi
isIOS:
复制代码
1
2
3return /iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());
isIphoneX:
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37let hasUaOrDpr = /iphone/gi.test(window.navigator.userAgent) && window.devicePixelRatio; // iPhone X、iPhone XS、iPhone 12 mini let isIPhoneX = hasUaOrDpr && window.devicePixelRatio === 3 && window.screen.width === 375 && window.screen.height === 812; // iPhone XS Max let isIPhoneXSMax = hasUaOrDpr && window.devicePixelRatio === 3 && window.screen.width === 414 && window.screen.height === 896; // iPhone XR let isIPhoneXR = hasUaOrDpr && window.devicePixelRatio === 2 && window.screen.width === 414 && window.screen.height === 896; // iPhone 12、iPhone 12pro let isIPhone12 = hasUaOrDpr && window.devicePixelRatio === 3 && window.screen.width === 390 && window.screen.height === 844; // iPhone 12 Pro Max let isIPhone12ProMax = hasUaOrDpr && window.devicePixelRatio === 3 && window.screen.width === 428 && window.screen.height === 926; return ( isIPhoneX || isIPhoneXSMax || isIPhoneXR || isIPhone12 || isIPhone12ProMax );
最后
以上就是飞快小丸子最近收集整理的关于iphoneX、iPhone12尺寸的全部内容,更多相关iphoneX、iPhone12尺寸内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复