<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<script>
function adjustFontsize() {
var n = document.documentElement,
e = screen.width > 0 && (window.innerWidth >= screen.width || 0 == window.innerWidth) ? screen.width: window.innerWidth;
e && (e = Math.min(e, 750), n.style.fontSize = e / 375 * 20 + "px")
}
</script>
<script>
adjustFontsize();
var evt = "onorientationchange" in window ? "orientationchange": "resize";
window.addEventListener(evt, adjustFontsize, !1)
</script>
js 设置 手机端,电脑端自适应
最新推荐文章于 2024-06-01 21:54:01 发布