https://www.jb51.net/article/155482.htm
CONST isIphonex = () => { // X XS, XS 맥스 XR CONST xSeriesConfig = [ { devicePixelRatio : 3 , 폭 : 375 , 높이 : 812 , }, { devicePixelRatio : 3 , 폭 : 414 , 높이 : 896 , } , { devicePixelRatio : 2 , 폭 : 414 , 높이 : 896 , } ]; // H5 경우 ( 대해서 typeof! 창 == '미정의'&& 창) { CONST의 isIOS = / 아이폰 / gi.test (window.navigator.userAgent); 만약 (! isIOS) 반환 거짓 ; CONST {devicePixelRatio 화면} = 창; CONST {폭, 높이} = 스크린; 창 xSeriesConfig.some (항목 => === item.devicePixelRatio devicePixelRatio && item.width === 폭 && item.height === 높이); } 반환 거짓 ; }