我想讓我的兩個按鈕居中,就像我用h2做的那樣,但失敗了。水平居中自舉按鈕
代碼:
HTML:
<div class="container theme-showcase" role="main">
<div id="innermain" class="col-xs-12">
<div><h2>Please choose one button</h2></div>
<div id="row" class="col-xs-12">
<div id="kiosk_btn" class="btn btn-default col-xs-3" onclick="">Button 1</div>
<div id="kiosk_btn" class="btn btn-default col-xs-3" onclick="">Button 2</div>
</div>
</div>
</div>
CSS:
#kiosk_btn{font-size: 3vh; background-color: #141E26; border:none; box-shadow: 5px 5px 5px black; margin: 2vh; padding-top:2vh; color:white;}
#kiosk_btn:active{outline: none; text-decoration: none;}
#kiosk_btn:focus{outline: none; text-decoration: none; }
#kiosk_btn:hover{text-decoration: none; background-color: #213140;}
h2{text-align: center;}
替換css #kiosk_btn { background-color:#141e26; border:medium none; box-shadow:5px 5px 5px black; 顏色:白色; float:none; font-size:3vh; margin:2vh; padding-top:2vh; } .............. 和使用類通過給家長文字居中對齊修改HTML代碼...............