1. body {
    2. //设置页面大小
    3. width: 1920px;
    4. height: 1080px;
    5. //关键
    6. transform-origin: left top 0px;
    7. }

    在浏览器resize时刷新并调用方法:

    body_resize = () => {
      let wid = 1920;
      let hei = 1080;
      if (window.innerWidth == wid && window.innerHeight == hei) return;
      document.body.style.transform =
        "scale(" +
        window.innerWidth / wid +
        "," +
        window.innerHeight / hei +
        ")";
      }