【发布时间】:2023-03-04 08:07:04
【问题描述】:
我在 bootstrap col 中有一个带有 bg 图像的 div,现在我的计划是让 div 中的文本贴在底部我尝试过使用垂直对齐但似乎不起作用
我的html:
<div class="has-image col-md-6 nopadding">
<div style="background-image: url('img/st-jansvliet.jpg');">
<div class="stick-to-bottom">Sint Jansvliet- Antwerpen</div>
</div>
</div>
我的 CSS:
.stick-to-bottom{
vertical-align: bottom;
}
带有 bg 图像的 div 的高度与我使用 jquery 设置的屏幕尺寸相对应
【问题讨论】:
标签: html css twitter-bootstrap