>  기사  >  웹 프론트엔드  >  bootstrap样式问题_html/css_WEB-ITnose

bootstrap样式问题_html/css_WEB-ITnose

WBOY
WBOY원래의
2016-06-21 09:11:311011검색

        <div class="form-group">            <label class="control-label col-md-1" for="Receiver">收件人</label>            <div class="col-md-10" style="border:1px dashed #ff0000;">                <input type="text" class="form-control" />                <input class="form-control" data-val="true" data-val-length="4到20个字符" data-val-length-max="20" data-val-length-min="4" data-val-required="必填" id="Receiver" name="Receiver" type="text" value="" />                <span class="field-validation-valid text-danger" data-valmsg-for="Receiver" data-valmsg-replace="true"></span>            </div>        </div>


form-control在bootstrap样式中width设置100%为何只占这么点呢?大概只有2个栅格
效果也没错啊?什么情况?


回复讨论(解决方案)

<div class="form-group col-md-12">
 外面的div定个占有栅栏试试

<div class="form-group col-md-12">
 外面的div定个占有栅栏试试


试了~不行~额~
这个这个不行啊

<div class="container">	<div class="row">        <div class="form-group">            <label class="control-label col-md-1" for="Receiver">收件人</label>            <div class="col-md-10">                <input class="form-control" data-val="true" data-val-length="4到20个字符" data-val-length-max="20" data-val-length-min="4" data-val-required="必填" id="Receiver" name="Receiver" type="text" />                <span class="field-validation-valid text-danger" data-valmsg-for="Receiver" data-valmsg-replace="true"></span>            </div>        </div>	</div></div>

<div class="container">	<div class="row">        <div class="form-group">            <label class="control-label col-md-1" for="Receiver">收件人</label>            <div class="col-md-10">                <input class="form-control" data-val="true" data-val-length="4到20个字符" data-val-length-max="20" data-val-length-min="4" data-val-required="必填" id="Receiver" name="Receiver" type="text" />                <span class="field-validation-valid text-danger" data-valmsg-for="Receiver" data-valmsg-replace="true"></span>            </div>        </div>	</div></div>



<div class="container">	<div class="row">        <div class="form-group">            <label class="control-label col-md-1" for="Receiver">收件人</label>            <div class="col-md-10">                <input class="form-control" data-val="true" data-val-length="4到20个字符" data-val-length-max="20" data-val-length-min="4" data-val-required="必填" id="Receiver" name="Receiver" type="text" />                <span class="field-validation-valid text-danger" data-valmsg-for="Receiver" data-valmsg-replace="true"></span>            </div>        </div>	</div></div>



加了个container和row也没效果啊
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.