移动端适配之rem
<script> function setSize(){ var a = document.documentElement ? document.documentElement.clientWidth : document.body.clientWidth; if(a > 750) { a = 750 }; document.documentElement.style.fontSize = a * 1 / 16 + "px"; _htmlFontSize = a * 1 / 16; } setSize(); window.onresize = function(){ setSize(); } </script>