<script> var html = document.querySelector("html"); html.style.fontSize = html.offsetWidth /7.5 + "px"; addEventListener("resize",function(){ html.style.fontSize = html.offsetWidth / 7.5 + "px"; },false); </script>
rem设置根元素的字体大小
最新推荐文章于 2024-06-26 11:01:04 发布