移动端rem适配:
var deviceWidth = document.documentElement.clientWidth; if (deviceWidth > 750) deviceWidth = 750; document.documentElement.style.fontSize = deviceWidth / 7.5 + "px";
解决安卓手机键盘唤起引起样式问题:
var clientHeight = document.documentElement.clientHeight document.body.style.height = clientHeight + 'px' document.documentElement.style.height = clientHeight + 'px'