加在head中
<script type="text/javascript"> function fontFun() { var winW = document.documentElement.clientWidth; document.documentElement.style.fontSize = (winW / 750 * 625) + "%"; } fontFun(); window.onresize = fontFun; </script>