有人可以解释我如何使用bootstrap 4 beta将button
与文字标题对齐,我确定此example不起作用,因为pull-left
已更改。
当我尝试对齐它们时,我正在使用float-left
,但按钮并不完全正确,所以标题应位于左侧,右侧按钮位于同一行,这是我的{ {3}},有人可以通过新的bootstrap 4 beta解释我是谁实现这一点。
<div class="row justify-content-center">
<div class="col-6">
<h5><strong>BLOG TITLE GOES HERE</strong></h5>
<div class="float-right">
<button type="button" class="btn btn-outline-secondary">Read more</button>
</div>
<p class="blockquote-footer text-primary">By Branko Milosevic</p>
<p>22.08.2017</p>
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
答案 0 :(得分:1)
<div class="row justify-content-center">
<div class="col-6">
<div class="foo">
<h5><strong>BLOG TITLE GOES HERE</strong></h5>
<div class="float-right">
<button type="button" class="btn btn-outline-secondary">Secondary</button>
</div>
</div>
<p class="blockquote-footer text-primary">By Petar Pilipovic</p>
<p>22.08.2017</p>
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
</div>
<style>
.foo { display: flex; justify-content: space-between; }
</style>