移動端rem適配:spa
var deviceWidth = document.documentElement.clientWidth; if (deviceWidth > 750) deviceWidth = 750; document.documentElement.style.fontSize = deviceWidth / 7.5 + "px";
解決安卓手機鍵盤喚起引發樣式問題: code
var clientHeight = document.documentElement.clientHeight document.body.style.height = clientHeight + 'px' document.documentElement.style.height = clientHeight + 'px'