【发布时间】:2014-09-11 09:45:28
【问题描述】:
我正在尝试使用display: table 属性构建一个表。
我遇到的问题是我有一个结构,其中我的表包含不同的行,每两行应该构建一组行。
因此我使用了table-row-group
<div class="table">
<div style="display: table-row-group;">
<div class="display: table-row;">
<div class="cell">
<p>18:00:00</p>
</div>
<div class="cell"></div>
<div class="cell right">
<p>A</p>
</div>
</div>
<div class="display: table-row;">
<div class="cell team">
<p>Team 1</p>
</div>
<div class="cell center">
<p>:</p>
</div>
<div class="cell right team">
<p>Team 2</p>
</div>
</div>
</div>
</div>
这是小提琴:http://jsfiddle.net/2xqfdn38/
我现在想做的是,每个表行组之间应该是一个空格,而不是表行之间。我尝试在类表中添加边框间距,但这会导致所有行之间的间距,而不仅仅是表行组之间。
有人知道解决办法吗?
【问题讨论】:
-
你为什么不用真正的桌子?
-
请通过工作演示查看我的答案 :)
标签: html css css-tables tablerow