13 lines
430 B
JavaScript
13 lines
430 B
JavaScript
|
!(function(win, doc, orw) {
|
||
|
var docEle = doc.documentElement;
|
||
|
fnResetHtmlFontSize();
|
||
|
function fnResetHtmlFontSize() {
|
||
|
var width = docEle.clientWidth;
|
||
|
if (width >= orw) {
|
||
|
docEle.style.fontSize = '100px';
|
||
|
} else {
|
||
|
docEle.style.fontSize = (width / orw) * 100 + 'px';
|
||
|
}
|
||
|
}
|
||
|
win.addEventListener('resize', fnResetHtmlFontSize, false);
|
||
|
})(window, document, 750);
|