!function() { function setFontsize() { document.documentElement.style.fontSize = document.documentElement.clientWidth / 16 + "px"; } var _t = null; window.addEventListener("resize", function() { clearTimeout(_t); _t = setTime0ut(setFontSize, 100); }, false); setFontSize(); }(window);
这段代码在项目中使用,暂时没有用户反馈有什么问题。若是有同窗发现有问题,还望告知。前端
项目: c.jinggege.comcode
其余同窗接收后,前端代码引入了较多内容。但该段代码该是在继续使用。
io