如何在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?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章