Twitter bootstrap 上传后的图像没有相等的空间
上传图像后,图像在表中有不同的空间。我的意思是每个图像之间的空间是不同的 我用的是:Twitter bootstrap 上传后的图像没有相等的空间,twitter-bootstrap,css,Twitter Bootstrap,Css,上传图像后,图像在表中有不同的空间。我的意思是每个图像之间的空间是不同的 我用的是: <div class="table-responsive"> <table class="table"> <tr> <th style="width: 10%"><h4>@Html.DisplayFor(model => model.FirstName)</h4
<div class="table-responsive">
<table class="table">
<tr>
<th style="width: 10%"><h4>@Html.DisplayFor(model => model.FirstName)</h4></th>
<th style="width: 30%"><h4> @Html.DisplayFor(model => model.LastName)</h4></th>
<th style="width: 120%"></th>
</tr>
<tr>
<td>
<img width="200" height="150" src="@Url.Action("GetImage", "Account", new {id = Model.Id })">
</td>
</tr>
<tr>
<th><h2><br /></h2></th>
</tr>
<tr>
@foreach (var item in Model.LolaBikePhotos)
{
<th style="width:10%"> <img src="~/Images/profile/@item.ImagePath" alt="" height=150 width=200 /></th>
}
</tr>
</table>
</div>
这是图像的循环:
@foreach (var item in Model.LolaBikePhotos)
{
<th style="width:10%"> <img src="~/Images/profile/@item.ImagePath" alt="" height=150 width=200 /></th>
}
我上传的图片说明了一切
首先谢谢你为什么?宽度将等于70%
在我建议您使用css网格而不是表格之后您的表格是完全错误的。每行tr必须具有相同数量的小区td或th。如果不是,则必须使用ColSpan,以便单元格数量等于单元格最多的行的数量。你的第一排有3个单元格。你的第二个手机。你的第四行看起来可能有任意数量的单元格等等。酷,我有一个小错误,不是70%,而是100-30+10=60%: