使用“display:table-cell”是有一种方法来获得“colspan”功能? [英] Using "display: table-cell" is there a way of getting the "colspan" functionality?
问题描述
使用 display:table-cell
有一种获得 colspan
功能的方法,真实表单元格?
Using display: table-cell
is there a way of getting the colspan
functionality, which is available when using real table cells?
特别是我需要一些单元格来跨多列。
In particular I need some "cells" to span multiple columns.
不是一种可能性,因为我使用每行形式,这将不会验证为真实表。
Real tables are not a possibility as I am using a form per row layout, which won't validate as a real table.
推荐答案
不能添加colspan或rowspan来显示:table-cell。这是表格单元格功能的限制之一!
No you cannot add colspan or rowspan to display:table-cell. It is one of the limitations in table-cell feature!
您可以检查此参考链接中的限制
You can check the limitations in this reference link
http://www.onenaught.com/posts/201/use-css-displaytable -for-layout
如果你想把COLSPAN特性带到table-cell,你必须使用table-row-group和table-caption功能如下
If you want to bring the COLSPAN feature into table-cell, then you have to use table-row-group and table-caption feature as follows
display: table-caption
和
table-row-group;
检查此小提琴链接: http://jsfiddle.net/ZQQY4/
这篇关于使用“display:table-cell”是有一种方法来获得“colspan”功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!