1
李凌
9 days ago 3f1ab7f7f65fe665f6977f94899c763cc1ef1faf
1
2
3
4
5
6
7
8
9
const baseSize = 16
function setRem() {
    const scale = document.documentElement.clientWidth / 828
    document.documentElement.style.fontSize = baseSize * scale + 'px'
}
setRem()
window.onresize = function () {
    setRem()
}