我正在尝试使用css/html来实现类似于此的表格。可能吗 ?高级css/html表格样式
所以白色区域为places
表。这是表的HTML:
<table class="places">
<tr>
<td class="solid">K</td>
<td> </td>
<td> </td>
<td class="solid">P</td>
<td> </td>
</tr>
<tr>
<td class="solid">25</td>
<td class="solid">26</td>
<td> </td>
<td class="solid">47</td>
<td class="solid">48</td>
</tr>
(...)
</table>
而且我的CSS:
.places{
position:relative;
background:white;
width:160px;
margin:0 auto;
text-align:left;
padding:5px;
border-collapse: collapse;
}
.places tr {
}
.places td {
width:22px;
height:22px;
text-align:center;
}
.solid {
border: 1px solid #d2cdd1;
border-top:none;
background-color:#e7e7e7;
text-align:center;
cursor:pointer;
}
我敢肯定的是,虽然表比其他HTML对象有点不同,填充应该在这里工作。但看起来我错了。 Cellspacing/cellpading无效。目前,我能得到的东西看起来像这样:
我应该忘记关于桌子,并与无序ilsts做? – 2010-08-29 01:12:26
您应该考虑如果您的列表是erm ...列表,而不是表格数据。我们现在还不能确切地说... – 2010-08-29 01:18:24