bluesky1024

window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", function() {
    if (window.orientation === 180 || window.orientation === 0) {
      document.getElementsByTagName("html")[0].style.fontSize=document.documentElement.offsetWidth*12/375+"px"
    }
    if (window.orientation === 90 || window.orientation === -90 ){
      document.getElementsByTagName("html")[0].style.fontSize=document.documentElement.offsetWidth*12/375+"px"
    }
}, false);

分类:

技术点:

相关文章:

  • 2021-07-08
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-06-08
相关资源
相似解决方案