【问题标题】:My ms-auto is not aligning the contents right inside a div? [duplicate]我的 ms-auto 没有在 div 内对齐内容? [复制]
【发布时间】:2021-11-11 19:36:57
【问题描述】:

以下是我的代码,但 ms-auto 根本不起作用:

<div class="p-5 rounded bg-light text-dark">
  <div class="container row">
    <div class="col-sm-6">
      <p>Copyright © 2021 Ekayanam - All Rights Reserved.</p>
    </div>
    <div class="col-sm-6 ms-auto">
      <a href="https://www.facebook.com/Ekayanam" target="_blank"><i class="fab fa-facebook text-primary fa-2x"></i></a>
      <a href="https://www.instagram.com/ekayanam/" target="_blank"><i class="fab fa-instagram text-danger fa-2x"></i></a>
    </div>
  </div>
</div>

我正在使用引导程序 5...

【问题讨论】:

  • 你想做什么?如果您想将页面上的所有内容居中,请尝试mx-auto

标签: javascript php bootstrap-5


【解决方案1】:

如果要将锚标记推送到列的右侧,请使用text-end(Bootstrap 5)或text-right(用于 Bootstrap 4)而不是 ms-autoJSFiddle

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-10-15
    • 2015-04-18
    • 1970-01-01
    • 2016-11-20
    • 2021-10-21
    • 2019-03-24
    • 1970-01-01
    相关资源
    最近更新 更多