Bootstrap 内容放置到两边
文章目录

Bootstrap 4.1 将内容分布到两端

也可以使用 float-right 来实现

1
2
3
4
5
6
7
8
<div class="d-flex justify-content-between">
<div>
left
</div>
<div>
right
</div>
</div>

or, auto-margins (eg:ml-auto) in any flexbox container (row, navbar, card, d-flex, etc…)

1
2
3
4
5
6
7
8
<div class="d-flex">
<div>
left
</div>
<div class="ml-auto">
right
</div>
</div>