gistfile1.txt if (/iphone/gi.test(navigator.userAgent) (screen.availWidth === 375) (screen.availHeight === 812)) { alert('iPhoneX') if ((window.innerHeight == '375') (window.innerWidth == '812')) { alert('水平摆放') } else { alert('垂直
if (/iphone/gi.test(navigator.userAgent) && (screen.availWidth === 375) && (screen.availHeight === 812)) {
alert('iPhoneX')
if ((window.innerHeight == '375') && (window.innerWidth == '812')) {
alert('水平摆放')
} else {
alert('垂直摆放')
}
}
