let rootWidth = document.documentElement.clientWidth || document.body.clientWidth;
let rootHeights = document.documentElement.clientHeight || document.body.clientHeight;
let rootDom = document.querySelector('html');
if(rootWidth<440){
rootDom.style.fontSize = rootWidth /10.8 + 'px';
}else {
rootWidth=440
rootDom.style.fontSize = rootWidth /10.8 + 'px';
window.onload = () => {
document.getElementsByTagName("body")[0].style.minHeight = rootHeights+"px";
}
}
网友评论