zoukankan      html  css  js  c++  java
  • 前端常用的代码片段

    1.屏蔽页面中自动将数字转为手机号,并带下划线

    <meta name="format-detection" content="telephone=no" />

    要解开,只需"telephone=yes"即可

    <!-- iOS 图标 begin -->
    <link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-57x57-precomposed.png"/>
    <!-- iPhone 和 iTouch,默认 57x57 像素,必须有 -->
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114-precomposed.png"/>
    <!-- Retina iPhone 和 Retina iTouch,114x114 像素,可以没有,但推荐有 -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144-precomposed.png"/>
    <!-- Retina iPad,144x144 像素,可以没有,但推荐有 -->
    <!-- iOS 图标 end -->
    

    2.meta标签

    将所有设备的宽度统一定位720px,这样的好处是可以稳定住所有设备适配,单位也可以直接用px,但如果需要做二维码识别的,就慎用。因为这种模式下,二维码图总是识别不到,或者有图片需要长按保存之类的,也慎用。
    <meta name="viewport" content="target-densitydpi=device-dpi,width=720,user-scalable=no">
    
    经常用的,不多说了
    <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    

      

  • 相关阅读:
    最小化x11 debian
    chroot后 运行xeyes Error: Can't open display: :0.0
    std::bind1st和std::bind2nd
    bind1nd,not1,compose1等用法
    python中*和**的参数
    QT静态编译
    Qt中QEvent和信号槽的区别
    JSON文件内容加注释的几种方法
    C语言--#、##、__VA_ARGS__ 和##__VA_ARGS__ 的使用
    QT正则表达式
  • 原文地址:https://www.cnblogs.com/c1ndy/p/5363579.html
Copyright © 2011-2022 走看看