(如图)Bootstrap我缩小的时候,紧靠在一起怎么解决好?
缩小之后<divclass="form-group"><divclass="col-sm-12"><divclass="row"><labelclass="col-sm-...
缩小之后
<div class="form-group"> <div class="col-sm-12"> <div class="row"> <label class="col-sm-2 control-label hidden-xs">身高体重</label> <div class="col-sm-5 col-xs-12"> <input placeholder="身高(cm)" type="text" class="form-control" name="cm" /> </div> <div class="col-sm-5 col-xs-12"> <input placeholder="体重(kg)" type="text" class="form-control" name="kilogram" /> </div> </div> </div></div> 展开
<div class="form-group"> <div class="col-sm-12"> <div class="row"> <label class="col-sm-2 control-label hidden-xs">身高体重</label> <div class="col-sm-5 col-xs-12"> <input placeholder="身高(cm)" type="text" class="form-control" name="cm" /> </div> <div class="col-sm-5 col-xs-12"> <input placeholder="体重(kg)" type="text" class="form-control" name="kilogram" /> </div> </div> </div></div> 展开
1个回答
展开全部
<div class="form-group">
<div class="col-sm-12">
<div class="row">
<label class="col-sm-2 control-label hidden-xs">身高体重</label>
<div class="col-sm-5 col-xs-12 xs_top">
<input placeholder="身高(cm)" type="text" class="form-control" name="cm" />
</div>
<div class="col-sm-5 col-xs-12 xs_top">
<input placeholder="体重(kg)" type="text" class="form-control" name="kilogram" />
</div>
</div>
</div>
</div>
css部分:找到col-xs-12
更改 添加一个class .xs_top{margin-top:20px;;}
<div class="col-sm-12">
<div class="row">
<label class="col-sm-2 control-label hidden-xs">身高体重</label>
<div class="col-sm-5 col-xs-12 xs_top">
<input placeholder="身高(cm)" type="text" class="form-control" name="cm" />
</div>
<div class="col-sm-5 col-xs-12 xs_top">
<input placeholder="体重(kg)" type="text" class="form-control" name="kilogram" />
</div>
</div>
</div>
</div>
css部分:找到col-xs-12
更改 添加一个class .xs_top{margin-top:20px;;}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询