CSS Bootstrap 卡头:向右拉
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/46171138/
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
Bootstrap Card Header: pull-right
提问by Bj?rn C
How should i get my small text right aligned in a Bootstrap 4, Card Header?
我应该如何让我的小文本在 Bootstrap 4, Card Header 中正确对齐?
HTML
HTML
<div class="container">
<div class="row">
<div class="col">
<div class="card">
<!--CARD HEADER-->
<h4 class="card-header">HEADER <small class="pull-right">right aligned</small></h4>
<!--CARD BODY-->
<div class="card-body">
</div>
</div>
</div>
</div>
This is what i have tried:
https://jsfiddle.net/LL0qnnxm/60/
这是我尝试过的:https:
//jsfiddle.net/LL0qnnxm/60/
回答by kravisingh
Use float-{sm,md,lg,xl}-right
instead of pull-right
because it changed in Bootstrap 4. For more info please read this https://v4-alpha.getbootstrap.com/migration/
使用float-{sm,md,lg,xl}-right
而不是pull-right
因为它在 Bootstrap 4 中发生了变化。有关更多信息,请阅读此https://v4-alpha.getbootstrap.com/migration/
And for your solution please check the updated Fiddle
对于您的解决方案,请检查更新的Fiddle