zoukankan      html  css  js  c++  java
  • 半透明遮罩层覆盖整个可视区域

    我们经常会遇到点击一个按钮弹出一个对话框和一个变暗的遮罩层,简单的写法只能让遮罩层覆盖浏览器的大小,那么怎么让遮罩层覆盖全部区域呢?

    css代码如下:

     1 html,body {
     2     height: 100%;
     3     margin: 0;
     4     padding: 0;
     5 }
     6 .mask {
     7     height: 100%;
     8     width: 100%;
     9     position: fixed;
    10     _position: absolute;
    11     top: 0;
    12     z-index: 100;
    13 }
    14 .opacity {
    15     opacity: 0.3;
    16     filter: alpha(opacity=30);
    17     background: #000;
    18 }
  • 相关阅读:
    jPlayer
    nodemon
    微信
    防盗链
    ES2015 (ES6)
    静态资源
    WebP
    Retina
    ui-grid
    React入门2
  • 原文地址:https://www.cnblogs.com/misaki/p/3156474.html
Copyright © 2011-2022 走看看