如何在Twitter Bootstrap 3中居按钮? - How to center buttons in Twitter Bootstrap 3?

问题:

I am building a form in Twitter Bootstrap but I'm having issues with centering the button below the input in the form. 我正在Twitter Bootstrap中构建一个表单,但是我遇到了将表单中输入下方的按钮居中的问题。 I have already tried applying the center-block class to the button but that didn't work. 我已经尝试将center-block类应用于按钮,但这不起作用。 How should I fix this? 我该怎么解决这个问题?

Here is my code. 这是我的代码。

<!-- Button -->
<div class="form-group">
    <label class="col-md-4 control-label" for="singlebutton"></label>
    <div class="col-md-4">
        <button id="singlebutton" name="singlebutton" class="btn btn-primary center-block">
            Next Step!
        </button>
    </div>
</div>

解决方案:

参考一: https://stackoom.com/question/1Wjn3
参考二: How to center buttons in Twitter Bootstrap 3?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章