https://jsfiddle.net/zvdktc63/1/
藍色盒子=旋轉木馬 紅色=幻燈片
絕對位置div不向下推其他內容。
高度:自動和最小高度:自動不適用于位置:絕對。
看起來最小高度和高度應該自動工作,所以內容將下推,同時添加位置:絕對。
<div class="parent">
<div class="child">
scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds scsd scds
</div>
</div>
<div class="next">
</div>
.child {
background: red;
position: relative;
}
.next {
background: blue;
height: 20px;
width: 20px;
}
.parent {
position: absolute;
word-wrap: break-word;
min-height: 30px;
}
上一篇vert.x vue
下一篇uniapp和vue區別