Twitter bootstrap bootstrap3中文本输入字段的宽度

Twitter bootstrap bootstrap3中文本输入字段的宽度,twitter-bootstrap,twitter-bootstrap-3,Twitter Bootstrap,Twitter Bootstrap 3,bootstrap3是否具有增加文本输入字段宽度的本机功能 我知道在bootstrap2中,我只是添加了一个类似input lg的类来修改输入的宽度,但是在bootstrap3中,这似乎只是增加了高度。看看“列大小”小节 使用.input lg等类设置高度,使用.col lg-*等网格列类设置宽度。 来自Bootstrap 3网站的示例: <div class="row"> <div class="col-lg-2"> <input type="text

bootstrap3是否具有增加文本输入字段宽度的本机功能

我知道在bootstrap2中,我只是添加了一个类似input lg的类来修改输入的宽度,但是在bootstrap3中,这似乎只是增加了高度。

看看“列大小”小节

使用.input lg等类设置高度,使用.col lg-*等网格列类设置宽度。

来自Bootstrap 3网站的示例:

<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>


我发现BS3结构非常笨重、臃肿。最好是为输入创建自己的css类,下面是我的:


但是如果我不想让他们坐在同一排,而是坐在单独的一排呢。我不需要为每一行创建div行吗?@IvanWang这里没有一个示例可以满足您的要求:?我是说设置输入字段宽度不是100%,而是不在同一行上堆叠多个输入字段。我现在找到了解决办法。谢谢
<div class="form-group">
    <label class="col-sm-3 control-label">Inline inputs</label>
    <div class="col-sm-9">
        <div class="form-inline">
            <input type="text" value="Item 1" required class="form-control w-2"/> <input type="text" value="Item 2" class="form-control w-2"/>
        </div>
    </div>
</div>

<div class="form-group">
    <label class="col-sm-3 control-label">Stacked Inputs</label>
        <div class="col-sm-9">            
            <input type="text" value="Item 1" required class="form-control w-2"/><input type="text" value="Item 2" class="form-control w-2"/>
        </div>
</div>
input[type="text"].w-2,
input[type="date"].w-2,
input[type="datetime"].w-2,
input[type="email"].w-2,
input[type="number"].w-2,
select.w-2{
width: 16.66666667%;
}
input[type="text"].w-3,
input[type="date"].w-3,
input[type="datetime"].w-3,
input[type="email"].w-3,
input[type="number"].w-3,
select.w-3{
width: 25%;
}
input[type="text"].w-4,
input[type="date"].w-4,
input[type="datetime"].w-4,
input[type="email"].w-4,
input[type="number"].w-4,
select.w-4{
width: 33.33333333%;
}
input[type="text"].w-5,
input[type="date"].w-5,
input[type="datetime"].w-5,
input[type="email"].w-5,
input[type="number"].w-5,
select.w-5{
width: 41.66666667%;
}