Twitter bootstrap 引导输入框未跨越4列
我举了一个例子:Twitter bootstrap 引导输入框未跨越4列,twitter-bootstrap,Twitter Bootstrap,我举了一个例子: <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-
<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>
它工作正常,输入框跨越2、3和4列。但是,如果我将列宽更改为:
<div class="row">
<div class="col-lg-6">
<input type="text" class="form-control" placeholder=".col-lg-6">
</div>
<div class="col-lg-4">
<input type="text" class="form-control" placeholder=".col-lg-4">
</div>
<div class="col-lg-2">
<input type="text" class="form-control" placeholder=".col-lg-2">
</div>
</div>
列宽的行为与预期不符。col-lg-6输入框没有扩展6列,并且似乎没有任何内容扩展超过4列。默认情况下,是否有禁止将列扩展到宽度超过4的内容?不知道这里会发生什么 刚刚弄清楚发生了什么事。默认的MVC项目模板创建一个_ViewStart.cshtml,它引用一个_Layout.cshtml。为了避免从ViewStart创建默认布局,我添加了:
@{
Layout = null;
}您使用的是哪个引导版本?您发布的代码在3.3引导下运行良好:我使用的是3.0版。从visual studio生成了一个MVC项目。我仍然看到它在3.0中工作。也许还有其他一些CSS应用于这些元素。不幸的是,由于这里不存在问题,因此很难确定。