DataGrid를 만들려고하는데 두 가지 문제가 발생했습니다.tr border-bottom 표시되지 않음
나는 국경 붕괴 (border-collapse)를 사용해야했다. 위에 모서리를 둥글게하는 것. 하지만 그렇게함으로써 나는 트렁크에 경계선을 추가 할 수있는 능력을 잃어 버렸습니다.
통찰력이 있으십니까?
http://fiddle.jshell.net/KNb7K/
CSS :
table.dgrid {
border: solid 1px #CDCDCD;
.border-radius(8px, 0px, 0px, 8px);
width: 100%;
border-collapse: separate;
}
table.dgrid th:first-child{
.border-radius(0px, 0px, 0px, 8px);
}
table.dgrid th:last-child{
.border-radius(8px, 0px, 0px, 0px);
}
table.dgrid th{
background-color: #E6E6E6;
}
table.dgrid tr th:last-child, table.dgrid tr td:last-child{
border-right: 0px;
}
table.dgrid tbody tr:last-child {
border-bottom: 0;
}
table.dgrid tr {
border-bottom: solid 1px #CDCDCD;
border-collapse: collapse ;
}
table.dgrid th, table.dgrid td {
padding: 5px;
text-align: center;
vertical-align: middle;
border-right: solid 1px #CDCDCD;
}
HTML :
<table class="dgrid">
<thead>
<tr>
<th>Ativar</th>
<th>Imagem</th>
<th>Posição</th>
<th>Link</th>
<th>Excluir</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" /></td>
<td></td>
<td></td>
<td><input type="text" /></td>
<td></td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td></td>
<td></td>
<td><input type="text" /></td>
<td></td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td></td>
<td></td>
<td><input type="text" /></td>
<td></td>
</tr>
</tbody>
</table>
가 TD 요소가 아닌 TR 요소에 테두리를 적용합니다. 그것은 afaik에게가는 가장 좋은 방법입니다. 그리고 그것은 제가 항상 해왔 던 것입니다. –
시도해보십시오. tyvm –