【发布时间】:2019-11-21 19:23:03
【问题描述】:
box3, box1和box4, box6之间有很大的差距如何消除差距?所以每个box 都可以有动态高度吗?
.wrap {
display: flex;
align-items: baseline;
align-content:flex-start;
justify-content: space-between;
flex-wrap: wrap;
background-color: lightblue;
}
.box {
display: flex;
background-color: tomato;
box-sizing: border-box;
border: 1px solid #C4C4C4;
height: 100px;
width: 45%;
margin-top: 15px;
}
.box1, .box4 {
height: 20px;
}
<div class="wrap">
<div class="box box1">box1</div>
<div class="box box2">box2</div>
<div class="box box3">box3</div>
<div class="box box4">box4</div>
<div class="box box5">box5</div>
<div class="box box6">box6</div>
</div>
这是所需的布局。谢谢
【问题讨论】:
-
您的问题令人困惑。您能否以更好的方式说明确切的问题?当前的问题是什么,您期望什么会有所帮助。