2016-02-10 89 views

回答

0

你可以遵循:Display two fields side by side in a Bootstrap Form

<div class="input-group"> 
<input type="text" class="form-control" placeholder="Start"/> 
<span class="input-group-addon">-</span> 
<input type="text" class="form-control" placeholder="End"/> 

+0

感謝您的快速評論。我用你的例子,發現「輸入組是錯誤的」。我修正了它:「form-incline」。我在http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-forms.php上找到了它。 –

0

你可以試試下面的代碼

<div class="container content"> 
    <div class='row'> 
     <form role="form" class="form-horizontal" method="post"> 
      <div class='col-xs-12 col-sm-4'> 
       <div class="form-group"> 
        <input class="form-control" name="" placeholder="Search from this date"> 
       </div> 
      </div> 
      <div class='col-xs-12 col-sm-4'> 
       <div class="form-group"> 
        <input class="form-control" name="" placeholder="Search till this date"> 
       </div> 
      </div> 
      <div class='col-xs-12'> 
       <div class="form-group"> 
        <button class="btn btn-primary">Search</button> 
       </div> 
      </div> 
      <div class='col-xs-12'> 
       <div class="form-group"> 
        <a href="link">Back</a> 
       </div> 
      </div> 
     </form> 
    </div> 
</div>