1rem=100px

document.documentElement.style.fontSize = innerWidth / 7.5 + 'px';
    window.onresize = function () {
      document.documentElement.style.fontSize = innerWidth / 7.5 + 'px';
    }

猜你喜欢

转载自www.cnblogs.com/zhanghailing/p/12021517.html