1
李凌
2026-01-17 a61cc184c622623672a730b71eb82e0e73b4c7d1
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()
}