今天,我在一个有52个字段的报表时,迫使我深入的做了一下研究,
我发现:
col在ff下的display的默认值是:table-column
visibility的默认值为:visible
我又查查了CSS手册,发现visibility有一个collapse的可选值,据说在IE下是没有实现的,IE没实现不竺于FF没有实现,就像FF不支持的不一定IE不支持一样。
BT的我,一个一个试了一遍,
终于发现了!
FF下可以用下面的方法,用COL把表格的列给隐藏!
欢呼!
复制代码 代码如下:
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/>
<title>无标题文档</title>
</head>
<body>
<tablewidth="100%"border="0">
<colgroup>
<colstyle="visibility:collapse;overflow:hidden;width:0px;"/>
<colstyle="visibility:collapse;overflow:hidden;width:0px;"/>
<colstyle="display:none"/>
<colstyle="display:none"/>
</colgroup>
<tr>
<tdscope="col">IE下,你可以看到这列<tdscope="col">IE下,你可以看到这列
<tdscope="col">FF下,你可以看到这列<tdscope="col">FF下,你可以看到这列</tr>
<tr>
<tdscope="row"></th>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<tdscope="row"></th>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<tdscope="row"></th>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<tdscope="row"></th>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</body>
</html>