【发布时间】:2022-02-06 21:38:31
【问题描述】:
如何使用 css 将 div 的内容与底部对齐
谁能帮忙完成这个?或者至少指向正确的方向?
我想要这样
这是我的代码:
.bbb{
text-align:center;
bottom: 20px;
}
.text-wi{
border-top:2px dashed #13aff2;
padding: 5px 0 0 20px;
}
.haha{
padding:5px
}
.widget-host {
display: grid;
grid-template-columns:auto auto;
grid-gap: 20px;
}
.widget-host > div.host-woovn {
border: 1px solid #e9e9e9;
padding: 0 5px 0 5px;
}
.button{
background-color: #669900;
text-align: center;
color: #fff;
cursor: pointer;
font-weight: bold;
font-size: 14px;
padding: 8px 15px;
display: inline-block;
margin-bottom: 10px;
height: initial;
border-radius: 4px;
}
<div class="widget-host"><div class="host-woovn">
AAAAAAAAAAAAAAAAA<div class="text-wi">
– A<br>
– B<br>
– C<br>
– D<br>
– C
</div>
<div class="bbb"> <a href="/" target="_blank" class="button">AAAAA</a></div>
</div>
<div class="host-woovn">
BBBBBBBBBBBBBBB<div class="text-wi">
– A<br>
– B<br>
– C<br>
– D<br>
– E<br>
– B<br>
– C<br>
– F</div>
<div class="bbb"><a href="/" target="_blank" class="button">BBBB</a></div>
</div></div>
它不像我想的那样工作。我做错了什么?
感谢任何帮助
【问题讨论】: