判断当前浏览器尺寸比例
2023-08-30 本文已影响0人
zkzhengmeng
window.addEventListener('resize',function(){
window.curzoom = window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI;
console.log('当前运行比例===',window.curzoom);
})
window.addEventListener('resize',function(){
window.curzoom = window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI;
console.log('当前运行比例===',window.curzoom);
})