<script>
    var docEl = document.documentElement,
            resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
    var clientWidth = docEl.clientWidth;
    docEl.style.fontSize = 10 * (clientWidth / 320) + 'px';
    window.addEventListener(resizeEvt, function() { clientWidth = docEl.clientWidth;docEl.style.fontSize = 10 * (clientWidth / 320) + 'px'; }, false);
</script>

  

相关文章:

  • 2021-07-27
  • 2021-10-16
  • 2021-10-16
  • 2021-12-25
  • 2022-12-23
  • 2021-12-25
  • 2021-11-07
  • 2022-12-23
猜你喜欢
  • 2021-12-25
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
  • 2021-07-06
  • 2021-10-22
相关资源
相似解决方案