function () {
function e() {
r.innerText = "html{font-size:" + (a.style.fontSize = a.getBoundingClientRect().width / o * d + "px") + " !important;}"
}
var t = navigator.userAgent,
n = (t.match(/(iPhone|iPad|iPod)/), t.match(/Android/i), window),
i = document,
a = i.documentElement,
o = (n.devicePixelRatio || 1, 375),
d = 50,
r = (i.head.querySelector('[name="viewport"]'), i.createElement("style"));
r.innerText = "html{font-size:50px !important}", i.head.appendChild(r), e(), n.addEventListener("resize", e, !1), a.className += t.match(/ucbrowser/i) ? " app-uc " : ""
}();
动态设置rem
最新推荐文章于 2022-01-08 15:16:34 发布