目前,我已经能够仅在第一行中使用表头来修整表的各个角落。
但是,我还有另一个表,在第一行和第一列中都有表头。然后,我该如何为那个桌子拐角?
我在下面使用的当前CSS样式表将使第一列中的标题变圆,但是我只需要以下标题:+table.rows[0].cells[0]
+table.rows[table.rows.length - 1].cells[0]
具有圆角:
#table {
font-family: "Lato","Helvetica Neue",Helvetica,Arial,sans-serif;
border-collapse: collapse;
float: right;
margin-top:20px;
width: 40%;
box-shadow: 0 2px 5px rgba(0,0,0,0.3);
border-radius: 4px;
}
#table th:first-of-type {
border-top-left-radius: 4px;
}
#table th:last-of-type {
border-top-right-radius: 4px;
}
#table tr:last-of-type td:first-of-type {
border-bottom-left-radius: 4px;
}
#table tr:last-of-type td:last-of-type {
border-bottom-right-radius: 4px;
}
不确定要了解的内容...是这个吗?
table {
font-family: "Lato","Helvetica Neue",Helvetica,Arial,sans-serif;
border-collapse: collapse;
float: right;
margin-top:20px;
width: 40%;
box-shadow: 0 2px 5px rgba(0,0,0,0.3);
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
td { text-align: center;}
<table>
<tr><th>.A</th><th>.B</th><th>.C</th></tr>
<tr><td>1A</td><td>1B</td><td>1C</td></tr>
<tr><td>2A</td><td>2B</td><td>2C</td></tr>
<tr><td>3A</td><td>3B</td><td>3C</td></tr>
</table>