我把div
with放在withclass="inner-box2"
之后。div
class="inner-box"
HTML:
<div class="box">
<div class="inner-box"></div>
<div class="inner-box2"></div>
</div>
CSS:
.box {
position: relative;
width: 400px;
height: 400px;
border: solid 10px red;
}
.inner-box {
border: solid 10px blue;
position: absolute;
height:150px;
width:380px;
}
.inner-box2 {
border: solid 10px green;
}
现在,我需要在div(inner-box2)
之后显示,div(inner-box)
但在我的代码div(inner-box2)
中显示在div(inner-box)
. 如何解决这个问题?见在线演示