我有我的观点Projet
有此表的asp.net应用MVC4:表内添加行HTML
<table style="line-height:30px; ">
<tr>
<th style="width:20%;color:blue">
Description de projet
</th>
<th style="width:20%;color:blue">
Le client
</th>
<th style="width:20%;color:blue">
Le statut du client
</th>
<th style="width:20%;color:blue">
Le groupe responsable
</th>
</tr>
@for (int i = 0; i < Model.Count; i += 4) {
<tr>
<td style="width:20%">
<center>@Model[i]</center>
</td>
<td style="width:20%">
<center>@Model[i+1]</center>
</td>
<td style="width:20%">
<center>@Model[i+2]</center>
</td>
<td style="width:20%">
<center>@Model[i+3]</center>
</td>
</tr>
}
</table>
我的问题是:即使我用不显示表内的行标签<th>
。
为什么发生这种情况?我该如何解决它?
什么行?你是指边界? ['line-height'](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height)可能不是你想象的那样。另外['
是的,我的意思是边界,为'行高'我用它来定义行之间的空间 – Lamloumi2
检查你的CSS,你可能已经隐藏了表格行(边框)。正如大卫所说,线条高度不适合线条。 – Brij