12345678910111213141516171819202122 |
- import { isPc } from "@queenjs/utils";
- export function initRemSize() {
- function setRem() {
- const clientWidth = document.documentElement.clientWidth;
- const width = clientWidth > 750 ? 750 : clientWidth;
- const fontSize = (width / 750) * (isPc() ? 50 : 100);
- document.documentElement.style.fontSize = fontSize + "px";
-
-
-
-
-
-
-
-
- }
- window.addEventListener("resize", setRem);
- setRem();
- }
|