twitter-bootstrap 使用 Bootstrap v4 将按钮对齐到“卡片”的右侧
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33596896/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Aligning button to the right of a 'card' using Bootstrap v4
提问by Michael LB
I'm new to Bootstrap and thought I'd dive in using their v4 alpha release.
我是 Bootstrap 的新手,我想我会深入使用他们的 v4 alpha 版本。
I'm trying to align the 'Arrange a valuation' button (near to bottom of page) in the following example to the right whilst leaving the other text aligned to the left. I also need the text and button to be vertically aligned in the middle.
我正在尝试将以下示例中的“安排估价”按钮(靠近页面底部)向右对齐,同时将其他文本向左对齐。我还需要文本和按钮在中间垂直对齐。
http://www.atlasestateagents.co.uk/mlb/landlords/services-and-fees.php
http://www.atlasestateagents.co.uk/mlb/landlords/services-and-fees.php
Can you help?
你能帮我吗?
<div class="card card-block card-blue clearfix">
<p class="card-text">Want to know how much rent you could achieve for your property? <a href="#" class="btn btn-blue-outline pull-right">Arrange a Valuation</a></p>
</div>
回答by Zim
In the latest Bootstrap 4 (alpha 6) pull-rightis now float-right:
在最新的 Bootstrap 4(alpha 6)pull-right中float-right:
<div class="card card-block card-outline-primary">
<p class="card-text">Want to know how much rent you could achieve for your property?
<a href="#" class="btn btn-outline-primary float-right">Arrange a Valuation</a>
</p>
</div>
回答by Christian Colón
Add .pull-rightto the a tag's class.
添加.pull-right到 a 标签的类。
<div class="card card-block card-primary">
<p class="card-text">Want to know how much rent you could achieve for your property? <a href="#" class="btn btn-primary-outline pull-right">Arrange a Valuation</a></p>
</div>

