function rem() { var htmlele = document.documentelement; var winwidth = htmlele.clientwidth || document.body.clientwidth; var width = winwidth; if(winwidth > 1441){htmlele.style.fontsize = math.ceil(100 * (width / 1920)) + 'px';} if(winwidth < 1601){htmlele.style.fontsize = math.ceil(110 * (width / 1920)) + 'px';} if(winwidth < 1441){htmlele.style.fontsize = math.ceil(120 * (width / 1920)) + 'px';} if(winwidth < 1367){htmlele.style.fontsize = math.ceil(125 * (width / 1920)) + 'px';} if(winwidth < 1201){htmlele.style.fontsize = math.ceil(140 * (width / 1920)) + 'px';} if(winwidth < 1025){htmlele.style.fontsize = 100 + 'px';} }; rem(); window.onresize = function() { rem(); }