我有两个输入:
<div class="form-group">
<label for="exampleInputEmail1">Original Amount</label>
<div class="input-group">
<div class="input-group-addon">$</div>
<input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
</div>
</div>
<div class="form-group">
<label for="exampleInputEmail1">Original Amount</label>
<div class="input-group">
<div class="input-group-addon">$</div>
<input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
</div>
</div>
我如何内联他们? (标签在每个顶部)
答案 0 :(得分:2)
您可以像这样使用Bootstrap网格..
<div class="row">
<div class="col-sm-4">
<label for="exampleInputEmail1">Original Amount</label>
<div class="input-group">
<div class="input-group-addon">$</div>
<input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
</div>
</div>
<div class="col-sm-4">
<label for="exampleInputEmail1">Original Amount</label>
<div class="input-group">
<div class="input-group-addon">$</div>
<input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
</div>
</div>
</div>
答案 1 :(得分:0)
将所有示例代码放在此div元素中:
<div class="form-inline">
...
</div>
有关详细信息,请参阅http://getbootstrap.com/css/#forms-inline。