删除了 input-xlarge
和 input-large
等关键功能后,Bootstrap 3 中的替代品是什么?
当然,我可以使用 col-lg-12
等,但这会在选项卡 Pane 中出现错误。
我也可以使用 style = "width:30px;
"但它会像 input-xlarge
那样失去响应能力。有什么建议等吗?
最佳答案
在 Bootstrap 3 中,.form-control
(您提供输入的类)的宽度为 100%,这允许您将它们包装到 col-lg-X div 中进行排列。文档中的示例:
<div class="row">
<div class="col-lg-2">
<input type="text" class="form-control" placeholder=".col-lg-2">
</div>
<div class="col-lg-3">
<input type="text" class="form-control" placeholder=".col-lg-3">
</div>
<div class="col-lg-4">
<input type="text" class="form-control" placeholder=".col-lg-4">
</div>
</div>
参见 Column sizing .
这与 Bootstrap 2.3.2 略有不同,但您很快就会习惯它。
关于text - 如何在Bootstrap 3中自定义输入字段宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18889294/