pop-box-mask
弹出窗下面有一个遮罩层
by lv san
HTML
<div class="box-default box-vc-trf">this is a pop-up box that only html+css</div>
<div class="mask"></div>
CSS
.box-default {
position: fixed;
top: 50%;
left: 50%;
z-index: 99;
padding: 20px;
background-color: white;
border: 1px solid #ccc;
border-radius: 8px;
}
.box-vc-trf {
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.mask {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 98;
background-color: #000;
opacity: 0.75;
filter: alpha(opacity=75);
}