【问题标题】:What the meaning of Bootstrap 5 class " me-auto "Bootstrap 5 类“me-auto”是什么意思
【发布时间】:2021-05-07 09:25:51
【问题描述】:

这是 bootstrap 5 navbar ul 部分代码。 我的问题是:

  1. 我无法从左到右更改 ul 位置。

  2. bootstrap 5 类“me-auto”是什么意思

  3. 关联 落下
  4. 动作
  5. 另一个动作
  6. 这里有别的东西
  7. 已禁用

【问题讨论】:

标签: twitter-bootstrap bootstrap-5


【解决方案1】:

.me-auto 更改为.ms-auto 会将其向右移动。

【讨论】:

    【解决方案2】:

    mr-auto => bootstrap 4 边距右自动

    me-auto => bootstrap 5 边距自动结束

    https://getbootstrap.com/docs/5.0/utilities/spacing/#margin-and-padding

    【讨论】:

    • 也许这值得解释一下?
    【解决方案3】:

    对于 ul 位置从左到右使用

    <ul class="nav justify-content-end">
    

    me-auto meening bootstrap 5 margin end-auto

    【讨论】:

      【解决方案4】:
      .me-auto {
        margin-right: auto !important;
      }
      

      上面的代码揭示了使用 Firefox 的开发者工具检查方法的 CSS 规则。

      【讨论】:

        【解决方案5】:
        1. 没有看到代码,我们无法帮助从左到右对齐或 你也许会用。

        float:right 或者你可以使用这个 CSS:

        .lefttoright {
          position: relative;
          right: 5px;
        }
        
        1. me-auto 向右推两个项目。

        【讨论】:

          【解决方案6】:

          您可以在 Bootstrap 5 中分别使用mr-automl-auto 进行左右对齐。

          class="navbar-nav mr-auto mb-2 mb-lg-0"
          

          【讨论】:

            猜你喜欢
            • 2014-05-06
            • 1970-01-01
            • 2015-09-02
            • 1970-01-01
            • 1970-01-01
            • 2011-05-27
            • 1970-01-01
            • 2020-10-01
            • 1970-01-01
            相关资源
            最近更新 更多