手机字体大小 px - rem javascript 换算

Posted 永颜

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了手机字体大小 px - rem javascript 换算相关的知识,希望对你有一定的参考价值。

       (function () {
            function o() {
                document.documentElement.style.fontSize = (document.documentElement.clientWidth  ) / 31.25 + "px"
            }
            var e = null;
            window.addEventListener("resize", function () {
                clearTimeout(e), e = setTimeout(o, 100)
            }, !1), o()
        })(window);

 

以上是关于手机字体大小 px - rem javascript 换算的主要内容,如果未能解决你的问题,请参考以下文章