谁能告诉我如何将用户名标签左对齐。
<form class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-3" for="username">Username</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="username" placeholder="Enter username">
</div>
</div>
</form>
最佳答案
需要移除form-horizontal
<form >
<div class="form-group">
<label class="control-label col-sm-3"for="username">Username</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="username" placeholder="Enter username">
</div>
</div>
</form>
Note:if you want any text-left or right then use text-left or text-right class but your code will work fine without these classes.
阅读本文档
您可以进一步使用 grid-framework.less 文件作为您的 View ,它将按行管理数据(以便更好地控制)
关于html - bootstrap 表单-水平左对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41281539/