<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="parent">
<div class="col-md-6 col-sm-6 col-xs-6">
<div class="bottomdiv">
</div>
</div>
<div class="col-md-6 col-sm-6 col-xs-6">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
</div>
</div></div>
<div class="container">
<div class="row align-items-start">
<div class="col">
One of three columns
</div>
<div class="col">
One of three columns
</div>
<div class="col">
One of three columns
</div>
</div>
<div class="row align-items-center">
<div class="col">
One of three columns
</div>
<div class="col">
One of three columns
</div>
<div class="col">
One of three columns
</div>
</div>
<div class="row align-items-end">
<div class="col">
One of three columns
</div>
<div class="col">
One of three columns
</div>
<div class="col">
One of three columns
</div>
</div>
</div>
8条答案
按热度按时间pengsaosao1#
可以将列设置为弹性框,并将图元与端点对齐。
2sbarzqh2#
在Bootstrap 4中,可以在列本身上使用
mt-auto
来将一个项目对齐到底部。默认情况下,它应该已经向左对齐hec6srdp3#
pdkcd3nj4#
在Bootstrap 4中
对于整行中的所有列,在行上使用
align-items-end
类对于col上的单列us
align-self-end
文档:https://getbootstrap.com/docs/4.0/utilities/flex/#align-items
xzv2uavs5#
您也可以尝试使用绝对CSS功能
然后检查位置,调整到适合你
hgb9j2n66#
在Bootstrap 5中,你可以使用align-items-bottom类:
ubof19bj7#
所以这很酷:
qxsslcnc8#
如果你不想玩css,你可以设置:
class="mb-0"
它会将margin bottom设置为零,并且应该将您的内容放在它所在的任何单元格的底部。mb,mt,mr,ml