zoukankan      html  css  js  c++  java
  • 移动端字体缩放问题解决方案-摘自《html5移动web开发实践》

    <!doctype html>
    <html>
      <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      </head>
      <body>
        <header>
        </header>
        <div>
        <h1>Lorem ipsum</h1>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
        Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
        Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        </div>
        <footer>
        </footer>
            <script>
              var metas = document.getElementsByTagName('meta');
                var i;
                if (navigator.userAgent.match(/iPhone/i)) {
                    for (i=0; i<metas.length; i++) {
                        if (metas[i].name == "viewport") {
                            metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
                        }
                    }
                    document.addEventListener("gesturestart", gestureStart, false);
                }
                function gestureStart() {
                    for (i=0; i<metas.length; i++) {
                        if (metas[i].name == "viewport") {
                            metas[i].content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";
                        }
                    }
                }
            </script>
      </body>
    </html>
  • 相关阅读:
    [USACO15FEB]Superbull 超级牛
    [SHOI2015]自动刷题机
    [BJOI2019]排兵布阵
    P3528 [POI2011]PAT-Sticks
    P3539 [POI2012]ROZ-Fibonacci Representation
    洛谷P1868 饥饿的奶牛
    洛谷P1462 通往奥格瑞玛的道路(SPFA+二分答案)
    [SDOI2008]山贼集团
    [SHOI2013]阶乘字符串
    30. 如何使用 GDB 调试 Go 程序?
  • 原文地址:https://www.cnblogs.com/beata/p/5736684.html
Copyright © 2011-2022 走看看