获取屏幕宽度:

window.screen.width * window.devicePixelRatio
获取屏幕高度:

window.screen.height * window.devicePixelRatio
eg:

const kuan = window.screen.width * window.devicePixelRatio;
const gao = window.screen.height * window.devicePixelRatio;
console.log('kuan', kuan);
console.log('gao', gao);




https://blog.csdn.net/liuhailong2014/article/details/123890863


您已经阅读00:00:00欢迎留言评论,喜欢的话就为作者点个赞或者赏颗糖吧! 分享