gpt4 book ai didi

css - 应用 col-xs 类时 Bootstrap 3 个不可点击的输入

转载 作者:行者123 更新时间:2023-11-28 05:47:51 25 4
gpt4 key购买 nike

当我将类 col-xs-5 应用到我的输入时,它变得不可点击。而且它只能在小屏幕上不可点击,在大屏幕上它工作正常。

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

我尝试将我的表单组片段包装到 .row 中,它变得可点击,但它弄乱了所有内容,请参见图片:enter image description here

谢谢。

最佳答案

您可以如下所示编辑您的代码

<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 类,您的可点击问题已得到解决。我附上屏幕截图供您引用 enter image description here

关于css - 应用 col-xs 类时 Bootstrap 3 个不可点击的输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37509415/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com