Css-empty-cells
提供:Dev Guides
CSS-空のセル
説明
_empty-cell_プロパティは、表示されているコンテンツを持たないテーブルセルのレンダリングを制御するために、分離境界テーブルレイアウトモデルで使用されます。
可能な値
- show -空のセルの境界線がレンダリングされます。
- hide -空のセルの境界線は描画されません。
に適用されます
table-cellが表示されているすべての要素。
DOM構文
object.style.emptyCell = "hide";
例
これは、<table>要素内の空のセルの境界線を非表示にするために使用されるempty-cellsプロパティです。
<html>
<head>
<style type = "text/css">
table.empty {
width:350px;
border-collapse:separate;
empty-cells:hide;
}
td.empty {
padding:5px;
border-style:solid;
border-width:1px;
border-color:#999999;
}
</style>
</head>
<body>
<table class = "empty">
<tr>
<th></th>
<th>Title one</th>
<th>Title two</th>
</tr>
<tr>
<th>Row Title</th>
<td class = "empty">value</td>
<td class = "empty">value</td>
</tr>
<tr>
<th>Row Title</th>
<td class = "empty">value</td>
<td class = "empty"></td>
</tr>
</table>
</body>
</html>
これにより、次の結果が生成されます–