if (navigator.userAgent.match(/(iPhone)/)) {
if ((screen.availHeight == 812) && (screen.availWidth == 375)) {
if ((window.innerHeight == "375") && (window.innerWidth == "812")) {// iPhone X Landscape 横屏
} else {// iPhone X Portrait 竖屏
}
}
}
网友评论