html模板

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>頁面標(biāo)題</title>
    <meta name="keywords" content="關(guān)鍵詞">
    <meta name="description" content="網(wǎng)頁描述">
    <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="圖標(biāo)路徑如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下點擊區(qū)域變暗 */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    /* 在iOS的Safari瀏覽器中,禁止長按喚起系統(tǒng)菜單 */
    -webkit-touch-callout: none;
  }

  :not(input) {
    /* 阻止長按選中文本  (在IOS中可能會導(dǎo)致input框無法輸入文字)*/
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

 /* 忽略所有鼠標(biāo)、觸摸操作,元素穿透,用于圖片禁止長按保存 */
  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>
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容