答案 0 :(得分:1)
如果底部p的高度固定,可以使用一种可能的选项
.wrapper {
display: -webkit-flex;
}
.item {
position: relative;
border: 1px solid black;
padding: 20px 20px 100px 20px;
margin: 10px;
}
.bottom {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 100px;
padding: 0;
margin: 0;
border: 1px solid red;
}

<div class="wrapper">
<div class="item">
<p>Other Stuff</p>
<p class="bottom">Bootom</p>
</div>
<div class="item">
<p>Other Stuff</p>
<p>Other Stuff</p>
<p>Other Stuff</p>
<p>Other Stuff</p>
<p class="bottom">Bootom</p>
</div>
<div class="item">
<p>Other Stuff</p>
<p>Other Stuff</p>
<p class="bottom">Bootom</p>
</div>
</div>
&#13;
答案 1 :(得分:0)
您可以将div设置为images
,然后将position: relative
代码设置为<p>
,然后从底部给出一个百分比以满足您的需求。
代码和演示:
position:absolute
CSS:
<div class="div1">
<p>I'm some random text</p>
</div>
<div class="div2">
<p>I'm some random text</p>
</div>
<div class="div3">
<p>I'm some random text</p>
</div>