2016-05-29 16 views
0

當我將類col-xs-5應用於我的輸入時,它變得不可點擊。它只能在小屏幕上無法點擊,在大屏幕上效果很好。引導程序當col-xs類應用時,3個不可點擊的輸入

<form action="" method="POST" role="form" class="col-lg-12 clearfix" style="padding: 0px;"> 




       <div class="form-group col-lg-1 col-lg-offset-0 col-md-1 col-md-offset-0 clearfix col-xs-5" style="padding: 0px;"> 

        <label for="">Badrooms</label> 

        <select name="" id="input" class="form-control" style="padding: 2px 2px;" > 
         @foreach([1,2,3,4,5,6,7,8,9,10] as $arr) 
          <option value="">{{{$arr == 10 ? '10 >' : $arr}}}</option> 
         @endforeach 
        </select> 
       </div> 
       <div class="form-group col-lg-1 col-lg-offset-1 col-md-1 col-md-offset-1 clearfix col-xs-5 col-xs-offset-2" style="padding: 0px;"> 
        <label for="">Bathrooms</label> 

        <select name="" id="input" class="form-control" style="padding: 2px 2px;" > 
         @foreach([1,2,3,4,5,6,7,8,9,10] as $arr) 
          <option value="">{{{$arr == 10 ? '10 >' : $arr}}}</option> 
         @endforeach 
        </select> 
       </div> 


       <div class="form-group col-lg-3 col-lg-offset-2 col-md-3 col-md-offset-2 clearfix" style="padding: 0px;"> 
        <label for="">Type</label> 

        <select name="" id="input" class="form-control" style="padding: 2px 2px;" > 
         @foreach(ListingTypeDB::all() as $type) 
          <option value="{{{$type->id}}}">{{{$type->type_name}}}</option> 
         @endforeach 
        </select> 
       </div> 

       <div class="form-group col-lg-2 col-lg-offset-2 col-md-2 col-md-offset-2 clearfix" style="padding: 0px;"> 
        <label for="">Rent/Buy</label> 

        <select name="" id="input" class="form-control" style="padding: 2px 2px;" > 

          <option value="1">Rent</option> 
          <option value="0">Buy</option> 

        </select> 
       </div> 


      </form> 

我tryed來包裝自己的狀態組片段到.row變成可點擊的,但它攪亂一切看到的景象:enter image description here

謝謝。

回答

0

如下圖所示

<div class="row"> 
      <div class="form-group col-sm-6" > 

      <div class="form-group col-sm-5" > 
         <label for="">Badrooms</label> 
        </div> 

        <div class="form-group col-sm-7" > 
         <select name="" id="input" class="form-control" > 
          @foreach([1,2,3,4,5,6,7,8,9,10] as $arr) 
           <option value="">{{{$arr == 10 ? '10 >' : $arr}}}</option> 
          @endforeach 
         </select> 
       </div> 
       <div class="clearfix"></div> 
      </div> 
      <div class="form-group col-sm-6" > 
       <div class="form-group col-sm-5" > 
        <label for="">Bathrooms</label> 
       </div> 
       <div class="form-group col-sm-7" > 
        <select name="" id="input" class="form-control" > 
         @foreach([1,2,3,4,5,6,7,8,9,10] as $arr) 
          <option value="">{{{$arr == 10 ? '10 >' : $arr}}}</option> 
         @endforeach 
        </select> 
       </div> 
        <div class="clearfix"></div> 

      </div> 
    </div> 

     <div class="row"> 
      <div class="form-group col-sm-6 " > 
       <div class="form-group col-sm-5" > 
        <label for="">Type</label> 
       </div> 

       <div class="form-group col-sm-7" > 
        <select name="" id="input" class="form-control" > 
         @foreach(ListingTypeDB::all() as $type) 
          <option value="{{{$type->id}}}">{{{$type->type_name}}}</option> 
         @endforeach 
        </select> 
       </div> 
       <div class="clearfix"></div> 

      </div> 

      <div class="form-group col-sm-6 "> 
       <div class="form-group col-sm-5" > <label for="">Rent/Buy</label></div> 

       <div class="form-group col-sm-7" > <select name="" id="input" class="form-control" > 

         <option value="1">Rent</option> 
         <option value="0">Buy</option> 

       </select></div> 
        <div class="clearfix"></div> 

      </div> 
     </div> 

使用這些CSS類可點擊的問題已solved.I附上截圖,供大家參考enter image description here

0

對於我來說,固定通過添加您可以編輯您的代碼:

    <div class="clearfix visible-xs-block"></div> 

在每個分隔符之後。您只能將其顯示爲特定大小,而我的只能顯示xs。你可以看看:

Bootstrap Grid responsive resets

相關問題