js判断iPhone X系列刘海头
2020-05-22 本文已影响0人
浪浪山小妖_
//判断是否刘海头
const isIphoneX = () => {
if (typeof window !== 'undefined' && window) {
return /iphone/gi.test(window.navigator.userAgent) && window.screen.height >= 812;
}
return false;
};
--by Affandi ⊙▽⊙