1
<div class="box small">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
<div class="detail"> for more info click below</div>
<div class="read-more"> click</div>
</div>
的CSS覆盖
.detail{
position: relative;
}
.detail:after{
content: "";
display: block;
position: fixed; /* could also be absolute */
bottom: 0;
left: 0;
height: 100%;
width: 20%;
z-index: 10;
background-color: rgba(0,0,0,0.2)
}
我婉添加背景这些两个div:
<div class="detail"> for more info click below</div>
<div class="read-more"> click</div>
我不能添加一个包装DIV,所以我正在使用覆盖技术:
我怎么能相对覆盖父母的盒子?
感谢,但我想只覆盖包装这两个div的: