bootstrap样式问题_html/css_WEB-ITnose

WBOY
Lepaskan: 2016-06-21 09:11:31
asal
1011 orang telah melayarinya

        <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>
Salin selepas log masuk


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


回复讨论(解决方案)

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

<div class="form-group col-md-12">
Salin selepas log masuk
Salin selepas log masuk
外面的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>
Salin selepas log masuk
Salin selepas log masuk
Salin selepas log masuk

<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>
Salin selepas log masuk
Salin selepas log masuk
Salin selepas log masuk



<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>
Salin selepas log masuk
Salin selepas log masuk
Salin selepas log masuk



加了个container和row也没效果啊
Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan