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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 12:42:20  来源:igfitidea点击:

Bootstrap Card Header: pull-right

csstwitter-bootstrap

提问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}-rightinstead of pull-rightbecause 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