BootStrap表单宽度设置方法
用bootstrap的栅格“ coll-md- ”命令设置宽度总是不尽人意,有时上下框对不齐,有时上下宽度又不齐,这时建议用“style="width:100px" "
<div class="page-header"> <form class="form-horizontal" > <div class="form-group form-group-lg"> <label class="col-sm-2 control-label no-padding-right"style="float:left;font-size:1em; font-family:Microsoft YaHei;"for="form-field-userName1">转运联单号</label> <div class="col-sm-4"> <input class="col-xs-12 col-sm-10" type="text" id="mission_id"placeholder="请输入关键字搜索"/> </div> </div> <form> <div>
2.或者人用style属性
<form class="form-horizontal" > <div class="form-group"> <label class="col-sm-1 control-label no-padding-right"style="width:180px;font-size:1em; font-family:Microsoft YaHei;"for="form-field-userName1">任务单号:</label> <div class="col-sm-4"> <input class="col-xs-12 col-sm-10" type="text" id="form-field-userName1"placeholder="请输入关键字搜索"/> </div> </div> </from>
对比可以看出来,使用第二种方法更加整齐些。
相关推荐
niepxiya 2019-09-05
TemplarAssassin 2017-10-25
TemplarAssassin 2017-10-16
jingtianyiyi 2015-12-16
happyzhangyin 2013-11-11
jingtianyiyi 2017-03-10
移动开发与培训 2017-05-23
soulis 2017-05-23
hllinc 2017-05-23
乔乔 2017-05-18
iChangebaobao 2017-05-17
soulis 2017-05-17
qiukui00 2017-03-29
zh000 2017-03-29
CoderEight 2017-03-17
ReunionIsland 2017-03-10
男儿何必尽成功 2017-03-07