【问题标题】:How can I automatically bring the text in the box to the center with bootstrap? [duplicate]如何使用引导程序自动将框中的文本带到中心? [复制]
【发布时间】:2021-08-15 05:34:35
【问题描述】:

我需要在中心显示文本的框。我尝试了 px 类,但它不起作用。它靠近但不完全是中心。我可以在这个主题中使用哪个引导类? enter image description here

【问题讨论】:

标签: html twitter-bootstrap padding bootstrap-cards


【解决方案1】:

在引导程序中居中的最简单方法之一是使用flex:

<div class="d-flex align-content-center align-items-center">
  <span>Your Text</span>
</div>

【讨论】:

    猜你喜欢
    • 2016-08-15
    • 2018-09-05
    • 2017-08-12
    • 1970-01-01
    • 2021-09-25
    • 1970-01-01
    • 1970-01-01
    • 2018-05-16
    • 2017-12-08
    相关资源
    最近更新 更多