如何使用bootstrap 3创建2列表单

时间:2014-06-20 21:58:49

标签: twitter-bootstrap-3

我使用bootstrap创建了表单3.如何创建2列表单。这是左侧的标签和右侧的输入,下拉框等

          <fieldset>

                  <div class="form-group">

                    <label for="exampleInputProject">Map info</label>

                    <input type="text" class="form-control" id="exampleInput" placeholder="">

                  </div>

                  <div class="form-group">

                    <label for="exampleInputPassword1">Class</label>

                    <input type="text" class="form-control" id="exampleInputTeam" placeholder="Team Project information">

                  </div>

                    <div class="form-group">

                    <label for="exampleInputProject">  info</label>

                    <input type="text" class="form-control" id="exampleInput" placeholder="Build Defintion">

                  </div>

                  </fieldset>

                  <fieldset>

                  <div class="form-group">

                    <label for="exampleInputPassword1">Name</label>

                    <input type="text" class="form-control" id="exampleInputTeam" placeholder="Build Def Name">

                  </div>    



                  <div class="form-group">

                    <label for="exampleInputPassword1">Location</label>

                    <input type="text" class="form-control" id="exampleInputTeam" placeholder="Config Location">

                  </div>  

</fieldset>

1 个答案:

答案 0 :(得分:1)

在{2}字段集周围添加<div class="col-md-6">

<div class="row"> 
 <div class="col-md-6">
     <fieldset>
    ...
     </fielset>
  </div>

    <div class="col-md-6">
       <fieldset>
    ...
      </fielset>
     </div>
 </div>

http://www.bootply.com/JziKUuxQYM