我正在使用fieldset在div周围创建标题边框。
这是代码:
<div class="form-group col-xs-12">
<fieldset class="field_set col-xs-12">
<legend style="font-weight:bold;font-size:20px"> Sproc Details:</legend>
<div class="col-xs-12">
<div class="form-group col-xs-3">
<span>
Application Name <span></span>
</span>
</div>
<div class="form-group col-xs-2">
<span>
DB Name <span></span>
</span>
</div>
<div class="form-group col-xs-3">
<span>
Schema Name <span></span>
</span>
</div>
<div class="form-group col-xs-4">
<span>
Sproc Name <span></span>
</span>
</div>
</div>
<div class="col-xs-12">
<div class="form-group col-xs-3">
<span class="btn btn-block btn-success">
{{appName}} <span></span>
</span>
</div>
<div class="form-group col-xs-2">
<span class="btn btn-block btn-success">
{{dbName}} <span></span>
</span>
</div>
<div class="form-group col-xs-3">
<span class="btn btn-block btn-success">
{{schemaName}} <span></span>
</span>
</div>
<div class="form-group col-xs-4">
<span class="btn btn-block btn-success">
{{sprocName}} <span></span>
</span>
</div>
</div>
</fieldset>
</div>
字段集的CSS是:
.field_set {
border: 2px white solid;
padding: 4px;
}
当我执行此:
我收到这样的输出:
如您所见,它没有完全显示。
最佳答案
更换:
<legend style="font-weight:bold;font-size:20px"> Sproc Details:</legend>
带有:
<legend style="font-weight:bold;font-size:20px;width:8%;"> Sproc Details:</legend>
关于html - div周围的字段集未完全显示,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31151157/