CSS empty-cells 屬性

實例

隱藏表中的空單元格的邊框和背景:

table
{
border-collapse:separate;
empty-cells:hide;
}

嘗試一下 ?

屬性定義及使用說明

empty-cells 屬性設置是否顯示表格中的空單元格(僅用于"分離邊框"模式)。

默認值: show
繼承: yes
版本: CSS2
JavaScript 語法: object.style.emptyCells="hide"


瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主流瀏覽器都支持empty-cells屬性。

注意:只有指定!DOCTYPE,IE8才支持empty-cells屬性。


屬性值

描述
hide不在空單元格周圍繪制邊框。
show在空單元格周圍繪制邊框。默認。
inherit規(guī)定應該從父元素繼承 empty-cells 屬性的值。


相關(guān)文章

CSS 教程: CSS Table