html模板

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>页面标题</title>
    <meta name="keywords" content="关键词">
    <meta name="description" content="网页描述">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta http-equiv="x-ua-compatible" content="IE=Edge">
    <!--<link rel='stylesheet' href='./css/base.css'></link>-->
   <link rel="shortcut icon" href="图标路径如favicon.ico" type="image/x-icon">
    <!--<script src='脚本文件路径'></script>-->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
<style>
  * {
    /* 禁用浏览器的默认行为,如双指缩放、滚动等功能 */
    touch-action: none;
    /* 阻止ios下点击区域变暗 */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    /* 在iOS的Safari浏览器中,禁止长按唤起系统菜单 */
    -webkit-touch-callout: none;
  }

  :not(input) {
    /* 阻止长按选中文本  (在IOS中可能会导致input框无法输入文字)*/
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

 /* 忽略所有鼠标、触摸操作,元素穿透,用于图片禁止长按保存 */
  img {
    pointer-events: none;
  }

</style>
</head>
<body>

</body>
<script>
  //阻止微信web中下拉 新版本微信需用window代替document.body
  document.body.addEventListener('touchmove', function (e) {
    e.preventDefault()
  }, { passive: false })
</script>
</html>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容