iphoneX在QQ内置浏览器中打开网页的下方tab栏fixed兼容问题

1.meta标签增加--viewport-fit=cover

  此标签使其下方刘海变为可展示区域;

2.判断QQ内置浏览器;

var ua = navigator.userAgent.toLowerCase();;
        if(ua.match(/QQ/[0-9]/i)){
            alert('isQQ')
        }

3.判断是否是iphoneX机型;

if(/iphone/gi.test(navigator.userAgent) && (screen.height == 812 && screen.width == 375)) {
            alert('isIphoneX')
        }
原文地址:https://www.cnblogs.com/vonson/p/9635089.html