1
MVCビューでテーブルを生成しています。コードは単純です。テーブルの頭と体の間に灰色の線を削除することはできません
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>
Company Name
</th>
<th>
Contact Name
</th>
<th>
Contact Title
</th>
<th>
Address
</th>
<th>
City
</th>
<th>
Region
</th>
<th>
Country
</th>
@*<th></th>*@
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.CompanyName)
</td>
<td>
@Html.DisplayFor(modelItem => item.ContactName)
</td>
<td>
@Html.DisplayFor(modelItem => item.ContactTitle)
</td>
<td>
@Html.DisplayFor(modelItem => item.Address)
</td>
<td>
@Html.DisplayFor(modelItem => item.City)
</td>
<td>
@Html.DisplayFor(modelItem => item.Region)
</td>
<td>
@Html.DisplayFor(modelItem => item.Country)
</td>
</tr>
}
</tbody>
</table>
</div>
私は、ブートストラップを使用していますが、ビューに、私は次のスタイルのコードを書かれている:
<style type="text/css">
thead {
background-color: #337aff;
color: white;
border-bottom-width: 0px;
}
tr:nth-child(even) {background-color: #f2f2f2}
table {
border: 2px solid #337aff;
border-collapse: collapse;
border-spacing: 0cm 0cm;
font-family: verdana;
border-bottom-width: 5px;
}
tbody {
border-top-width: 0px;
}
</style>
問題は、非常に小さな灰色の線のtbody thead要素間ととも間があるということです2 trでも、私はボーダーコラプス:コラプスとボーダースペース:0cm 0cm;
私はこれがなぜ起こっているのか、おそらくはbootstrap.cssファイルについて考えていません。
ありがとうございました。
あなたは小さな灰色を削除することができますので、おかげで Partha