我有我的觀點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