黄琪勇 1 year ago
parent
commit
45090191cc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/libs/rem.ts

+ 1 - 1
src/libs/rem.ts

@@ -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)