【发布时间】:2018-02-27 15:33:36
【问题描述】:
我想去掉中间的水平线。基本上,我希望表格有外边框和中间的垂直分隔线。我如何做到这一点?
JS 小提琴 - https://jsfiddle.net/kac69ovn/
table {
width: 85%;
border-collapse: collapse;
margin-left: 4%;
border: 1px solid black;
}
th {
text-align: left;
width: 50%;
border: 1px solid black;
padding: 5px 11px;
}
td {
text-align: left;
width: 50%;
border: 1px solid black;
padding: 5px 11px;
}
<table>
<tbody>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Lorem Ipsum is simply dummy text of the printing and </td>
<td>It is a long established fact that a </td>
</tr>
</tbody>
</table>
提前致谢!
【问题讨论】:
标签: html css css-tables