最佳答案
您应该为绿色 div 使用负边距底部。像这样:
<STYLE>
div.black {
z-index: 10;
}
div.green {
margin-bottom: -20px;
z-index: 100;
}
</STYLE>
<div class="red"></div>
<div class="green"></div>
<div class="black"></div>
关于html - CSS 重叠 div 顶栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42199455/