gpt4 book ai didi

html - 无法居中按钮

转载 作者:太空宇宙 更新时间:2023-11-03 19:40:49 25 4
gpt4 key购买 nike

我遇到了让按钮居中的问题,我尝试了 text-align: center,但它没有用。

.regis-btn {
border-radius: 0px;
text-align: center;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-o-border-radius: 10px;
-ms-border-radius: 10px;
}
<form action="" method="post" role="form">
<div class="form-group">
<label for="cellphone">Cellphone Number</label>
<input type="text" class="form-control" id="cellphone" minlength="10" placeholder="Cellphone">
</div>
<div class="form-group">
<label for="name">Username</label>
<input type="text" class="form-control" id="name" placeholder="Username">
</div>
<div class="form-group">
<label for="seriesnum">Series Number</label>
<input type="text" class="form-control" id="seriesnum" placeholder="Series Number">
</div>
<button type="button" class="btn regis-btn" id="register" style="background: #FFCC00;">
<span> Register </span>
</button>
</form>

最佳答案

你可以试试这个:

<div class="form-group text-center"> 
<button type="button" class="btn regis-btn" id="register" style="background: #FFCC00;"></button>
</div>

关于html - 无法居中按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43648820/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com