如何识别浏览器的类型
navigator 和 screen
js
// navigator
const ua = navigator.userAgent;
console.log(ua.indexOf('Chrome')); // 81
// screen
console.log(screen.width, screen.height); // 1920 1080