zoukankan      html  css  js  c++  java
  • h5禁止缩放,复制

    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width,minimum-scale=1">
    <meta name="format-detection" content="email=no">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <script>
    window.onload = function() {
    // 阻止双击放大
    var lastTouchEnd = 0;
    document.addEventListener('touchstart', function(event) {
    if (event.touches.length > 1) {
    event.preventDefault();
    }
    });
    document.addEventListener('touchend', function(event) {
    var now = (new Date()).getTime();
    if (now - lastTouchEnd <= 300) {
    event.preventDefault();
    }
    lastTouchEnd = now;
    }, false);

    // 阻止双指放大
    document.addEventListener('gesturestart', function(event) {
    event.preventDefault();
    });
    }//苹果手机禁止缩放

    </script>


    //禁止复制(QQ浏览器不行)
    #app{
      -webkit-touch-callout: none;
    -moz-touch-callout: none;
    -ms-touch-callout: none;
    touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    }
    img {
    pointer-events: none;
    }
     
  • 相关阅读:
    成立移动互联网公司???
    C++的子对象
    单链表 操作的18种算法
    再论虚函数
    多线程(三)
    多线程(二)
    多线程(一)
    存储过程的参数
    git
    多态(三)
  • 原文地址:https://www.cnblogs.com/ash-sky/p/11016669.html
Copyright © 2011-2022 走看看