您好,欢迎访问一九零五行业门户网

css中的关于empty-cells的问题

发现在css中,当把border-collapse设置为separate为,要不要empty-cells结果是一样的,而且用show与hide值都一样,望各位指点。
在css2标准中
语法:
empty-cells : show | hide
取值:
show : 默认值。显示边框
hide : 隐藏边框
说明:
设置或检索当表格的单元格无内容时,是否显示该单元格的边框。
只有当表格行和列的边框独立(例如当 border-collapse 属性等于 separate )时此属性才起作用。
对应的脚本特性为 emptycells 。
这是个css2的标准 不为ie所支持,在firefox中可以正常显示效果,具体效果的演示代码如下
<!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>table test</title> <style> #layout {} .show {border: 1px solid #ff0000; border-collapse:separate; empty-cells: show;} .hide {border: 1px solid #ff0000; border-collapse:separate; empty-cells: hide;} </style> </head> <body> <table id="layout"> <tr> <td class="show">cascading</td> <td class="show"></td> </tr> <tr> <td class="hide">cascading</td> <td class="hide"></td> </tr> </table> </body> </html>
可以看到 show的时候 空表格被显示出来,hide的时候 空表格被隐藏
以上就是css中的关于empty-cells的问题的详细内容。
其它类似信息

推荐信息