|
@@ -3,7 +3,7 @@ const baseSize = 10 // rem 比例
|
|
|
const doc = document.documentElement
|
|
|
function refreshRem() {
|
|
|
const width = doc.getBoundingClientRect().width
|
|
|
- doc.style.fontSize = baseSize * Math.min(width / baseWidth, 1) + "px"
|
|
|
+ doc.style.fontSize = baseSize * (width / baseWidth) + "px"
|
|
|
}
|
|
|
refreshRem()
|
|
|
window.addEventListener("resize", refreshRem)
|