我不知道如何在 Bootstrap 中将表单控件居中。我尝试将所有内容都包装在一个 .center div 中,但这样会使一些内容居中并搞砸其他内容。
.center
{
text-align: center;
}
最佳答案
你可以使用文本中心类
<p class="text-center">Center aligned text.</p>
其他文本对齐类是
<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>
<p class="text-justify">Justified text.</p>
<p class="text-nowrap">No wrap text.</p>
详细信息请访问http://getbootstrap.com/css/
关于css - 你如何使用 Bootstrap 将表单控件居中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14779951/