web
6 天以前 0c026f9cb1ccd39690a118af70023fe29f051388
index.html
@@ -5,17 +5,19 @@
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="renderer" content="webkit">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" href="/favicon.ico">
  <title>金川水电站生态流量监测系统</title>
  <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
    <script type="text/javascript" src="/jessibuca.js"></script>
  <style>
    html,
    body,
    #app {
      height: 100%;
      margin: 0px;
      padding: 0px;
      margin: 0;
      padding: 0;
    }
    .chromeframe {
@@ -212,4 +214,17 @@
  <script type="module" src="/src/main.js"></script>
</body>
<script>
    // 屏幕适配
    const t = window.devicePixelRatio   // 获取下载的缩放 125% -> 1.25    150% -> 1.5
    const width_screen = window.screen.width;
    let zoom = 1
    if (t !== 1) {
        zoom = (1 / t) * zoom;   // 就去修改页面的缩放比例
    }
    if (width_screen < 1366) {
        zoom = (width_screen / 1366) * zoom;   // 就去修改页面的缩放比例
    }
    document.body.style.zoom = zoom;   // 就去修改页面的缩放比例
</script>
</html>