【发布时间】:2021-08-15 05:34:35
【问题描述】:
我需要在中心显示文本的框。我尝试了 px 类,但它不起作用。它靠近但不完全是中心。我可以在这个主题中使用哪个引导类? enter image description here
【问题讨论】:
-
考虑编辑您的问题以包含您创建的适用 html 文本。
标签: html twitter-bootstrap padding bootstrap-cards
我需要在中心显示文本的框。我尝试了 px 类,但它不起作用。它靠近但不完全是中心。我可以在这个主题中使用哪个引导类? enter image description here
【问题讨论】:
标签: html twitter-bootstrap padding bootstrap-cards
在引导程序中居中的最简单方法之一是使用flex:
<div class="d-flex align-content-center align-items-center">
<span>Your Text</span>
</div>
【讨论】: