css遮罩层

帆 2024-05-01 0 阅读 0 评论
  <style>
  .add-1{
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 21%);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  }
  </style>
  <script>
  function ade(){
  document.getElementById('d4as').style.display="block";
  }
  </script>
  </head>
  <body>
  <a href="javascript:ade()">点击我有遮罩层</a>
  <div class="add-1" id="d4as" style="display: none;"></div>
  </body>


本文来源:重庆seo博客

本文地址:https://focusonseo.cn/css/71.html

文章声明:以上内容(如有图片或视频亦包括在内)除非注明,否则均为重庆seo博客原创文章,转载或复制请以超链接形式并注明出处。