function adjustFontSize() {
var baseSize = 100,
iWidth = document.documentElement.clientWidth,
resSize = baseSize / (640 / iWidth);
if(iWidth > 375)
{
resSize = 58;
}
document.getElementsByTagName('html')[0].style.fontSize = resSize + 'px';
}
adjustFontSize();
window.addEventListener('resize', adjustFontSize);