标签:highlight script floor com 直接 window win settime function
以后懒得写,直接复制了
var computedFz = (function(){ var designWidth = 375, rem2px = 100; function computedFz(){ var fz = Math.floor(window.innerWidth / designWidth * rem2px); document.documentElement.style.fontSize = (fz > 100 ? 100 : fz) + ‘px‘ } return computedFz; })() computedFz(); window.onresize = function(){ setTimeout(computedFz,500); }
标签:highlight script floor com 直接 window win settime function
原文地址:http://www.cnblogs.com/maomao93/p/7455554.html