制作遮罩层的样式
遮罩层的样式
<div class="content">
11111
<div class="mark"></div>
</div>
.content {
width: 100px;
height: 100px;
background: #fff;
border: 1px solid red;
position: relative;
}
.mark {
width: 100%;
height: 100%;
position: absolute;
background: rgba(0, 0, 0, 0.2);
top: 0;
left: 0;
z-index: 100;
cursor: pointer;
transition: all 0.15s;
}
.mark:hover {
background: rgba(0, 0, 0, 0.6);
}