欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

FF下 用 col 隱藏表格列的方法詳解!

 更新時(shí)間:2008年04月03日 18:54:45   作者:  
一直一來(lái),我都在想辦法看能不能用 col 控制表格的列隱藏,但是無(wú)奈,F(xiàn)F對(duì)COL支持不夠好(其實(shí)是以前沒(méi)有發(fā)現(xiàn)COL在FF下要怎么弄)。
今天,我在一個(gè)有52個(gè)字段的報(bào)表時(shí),迫使我深入的做了一下研究,
我發(fā)現(xiàn):
col在ff下的display 的默認(rèn)值是:table-column 
visibility的默認(rèn)值為:visible
我又查查了CSS手冊(cè),發(fā)現(xiàn) visibility 有一個(gè) collapse的可選值,據(jù)說(shuō)在IE下是沒(méi)有實(shí)現(xiàn)的,IE沒(méi)實(shí)現(xiàn)不竺于FF沒(méi)有實(shí)現(xiàn),就像FF不支持的不一定IE不支持一樣。
BT的我,一個(gè)一個(gè)試了一遍,

終于發(fā)現(xiàn)了!
FF下可以用下面的方法,用COL把表格的列給隱藏!
歡呼!
復(fù)制代碼 代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無(wú)標(biāo)題文檔</title>
</head>
<body>
<table width="100%" border="0">
 <colgroup>
  <col style="visibility: collapse;overflow:hidden;width:0px;" />
  <col style="visibility: collapse;overflow:hidden;width:0px;" />
  <col style="display:none"/>
  <col style="display:none"/>
 </colgroup>
 <tr>
  <td scope="col">IE下,你可以看到這列<td scope="col">IE下,你可以看到這列
  <td scope="col">FF下,你可以看到這列<td scope="col">FF下,你可以看到這列</tr>
 <tr>
  <td scope="row">&nbsp;</th>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td scope="row">&nbsp;</th>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td scope="row">&nbsp;</th>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td scope="row">&nbsp;</th>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
 </tr>
</table>
</body>
</html>

相關(guān)文章

最新評(píng)論