zoukankan      html  css  js  c++  java
  • vue移动端适配

    App.vue
    <template>
      <div id="app">
        <router-view />
      </div>
    </template>

    <script>
    export default {
      name: "App",
      mounted() {
      
       //移动端适配
        var html = document.getElementsByTagName("html")[0];
        var owidth =
          document.body.clientWidth || document.documentElement.clientWidth;
          html.style.fontSize = (owidth / 375) * 12 + "px";
        
      },
    };
    </script>

    <style >
    #app {
      100%;
     height: 100%;
     
    }
    </style>
    正道的光终将来临,当太阳升起的时候,光芒总会普照大地温暖人间。些许的阴霾也终会有被阳光洒满的一天
  • 相关阅读:
    MySQL Create table as / Create table like
    Oracle CAST() 函数 数据类型的转换
    day 12
    day 11
    day 10
    day 9
    day 8
    day 7
    day 6
    day 5
  • 原文地址:https://www.cnblogs.com/sjruxe/p/15084964.html
Copyright © 2011-2022 走看看