【发布时间】:2016-09-30 23:44:18
【问题描述】:
我有一个包含两列的简单表格,我想扩大列之间的间距。我已经尝试了 column-gap 属性,但没有成功。如何拉开差距?
#t td {
-webkit-column-gap: 40px;
-moz-column-gap: 40px;
column-gap: 40px;
}
#t tr:hover {
background-color: #00FF00;
}
#t tr:first-child {
font-weight: bold;
}
<table id="t">
<tr>
<td>Column1</td>
<td>Column2</td>
</tr>
<tr>
<td>1000</td>
<td>2000</td>
</tr>
</table>
【问题讨论】:
标签: html css css-tables