table-header-group和table-footer-group在Div中 [英] table-header-group and table-footer-group in a Div
问题描述
有没有在div中使用table-header-group和table-footer-group而不是在thead或tfoot中的方法?
Is there a way of using table-header-group and table-footer-group in a div instead of in a thead or tfoot?
推荐答案
根据 www.w3.org 当父元素(包含div的元素)显示为表格或内联表格时,允许使用 display:table-header-group
。所以应该允许这样的事情。
According to www.w3.org it is allowd to use display: table-header-group
when the parent (the element containing the div) is displayed as a table or inline-table. So something like this should be allowed
<table>
<div style="display: table-header-group;">header group</div>
</table>
如果父表不是表格,则应根据< a href =http://www.w3.org/TR/CSS2/tables.html#anonymous-boxes =noreferrer> www.w3.org 页面。
If the parent is not a table, then it should be inserted, according to point 4 on the www.w3.org page.
最大的问题是,所有(主流)浏览器是否都支持这一点。尤其是IE(6)以不支持大多数显示类型而闻名。
The big problem is, whether all (major) browsers support this. Especially IE(6) is known for not supporting most kinds of display types.
这篇关于table-header-group和table-footer-group在Div中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!