浏览器缩放比

const _dpr = devicePixelRatio;

window.addEventListener('resize', () => {
  document.documentElement.style.scale = _dpr / devicePixelRatio
})
posted @ 2024-04-08 17:35  _clai  阅读(5)  评论(0编辑  收藏  举报