【发布时间】:2020-06-17 22:51:05
【问题描述】:
以下标记存在间距问题。
<h2>Profitability Report</h2>
<form method="post">
<div class="row">
<div class="col-md-12">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary active">
<input type="radio" name="reporttype" id="option1" value="0" autocomplete="off" checked> Monthly
</label>
<label class="btn btn-secondary">
<input type="radio" name="reporttype" id="option2" value="1" autocomplete="off"> Quarterly
</label>
<label class="btn btn-secondary">
<input type="radio" name="reporttype" id="option3" value="2" autocomplete="off"> Annual
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<select id="date-options" asp-for="ReportSettings.MonthCode" class="form-control"></select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<select id="date-options" asp-for="ReportSettings.MonthCode" class="form-control"></select>
</div>
</div>
</div>
</form>
第二行和第三行之间的间距是我所期望的。但是为什么第一排和第二排之间没有间距呢?
【问题讨论】:
-
因为它的
.form-group为您提供了边距底部。另外,为什么你用标签代替<buttons>?
标签: html css twitter-bootstrap bootstrap-4