<div>
如图所示,我在父容器中有两个子元素<div>
:
<div class="row">
<div class="item">
<p>Sup?</p>
</div>
<div class="item">
<p>Sup?</p>
<p>Wish that other guy was the same height as me</p>
</div>
</div>
我尝试了以下 CSS:
.item {
background: rgba(0,0,0,0.1);
display: inline-block;
}
.row {
border: 1px solid red;
}
我怎样才能让两个孩子(div.item
)成为最高孩子的身高?
jsfiddle:http: //jsfiddle.net/7m4f7/