再次更新: 我通过选择最佳答案来结束这个问题,以防止人们在没有真正理解这个问题的情况下添加答案。在现实中,如果不使用网格或添加额外的 css,就无法在功能中进行构建。如果你正在处理的 help-block
元素需要超越一个简短的输入,例如,网格不能很好地工作,但是它们是“内置的”。如果这是一个问题,我建议使用额外的 css 类,你可以在 BS3的讨论 给你中找到。现在 BS4已经出来了,可以使用包含的 尺寸样式来管理它,所以这将不再是相关的很长时间。感谢大家对这个流行的 SO 问题的良好投入。
更新: 这个问题仍然没有解决,因为这是关于 BS 中的 内置的功能,它可以管理输入宽度,而不需要使用网格(有时它们必须独立管理)。我已经使用自定义类来管理它,所以这不是一个基本的 css 操作指南。这项任务是在 BS 专题讨论表专题讨论表,尚未得到解决。
原始问题: 有人想出一个方法来管理 BS3的输入宽度吗?我目前正在使用一些自定义类来添加这个功能,但是我可能遗漏了一些没有文档说明的选项。
现在的医生说。Collg-x,但是这显然不起作用,因为它只能应用于容器 div,这会导致各种各样的布局/浮动问题。
这里有一个小提琴。奇怪的是,在小提琴上,我甚至不能让形状组调整大小。
<form role="form" class="row">
<div class="form-group col-lg-1">
<label for="code">Name</label>
<input type="text" class="form-control">
</div>
<div class="form-group col-lg-1 ">
<label for="code">Email</label>
<input type="text" class="form-control input-normal">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>