【发布时间】:2019-09-09 16:43:19
【问题描述】:
我使用 foreach 列出带有图像的客户,它应该是 6 列的列表。 例如我有 18 个客户,它应该是 6 列 3 行的列表。
那里有剃须刀代码和html:
<div class="row">
@foreach (var patient in Model)
{
<div class="col-xs-2">
<figure style="text-align: center; margin-top: 10%; display: block;">
<img src="~/Content/images/pdficon.png" alt="">
<figcaption>
<div style="margin-top: 5%"><h4>@(patient.Name)</h4></div>
</figcaption>
</figure>
</div>
}
目前的结果是:
有 6 列还可以,但行位置已损坏。
【问题讨论】:
标签: c# html css razor bootstrap-4