<script>
(function (window, document) {
function resize() {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
var ww = window.innerWidth
if (ww > window.screen.width) {
window.requestAnimationFrame(resize)
} else {
if (ww > 750) {
ww = 750
}
document.documentElement.style.fontSize = ww * 100 / 750 + 'px'
}
}
}
resize();
window.addEventListener('resize', resize);
window.addEventListener('pageshow', function (e) {
if (e.presisted) {
resize();
}
});
})(window, document);
</script>
网友评论