【发布时间】:2013-09-17 22:43:53
【问题描述】:
如何使用 CSS 访问具有不同 tr 类名的表的第一行。
<div id="right">
<table>
<tbody>
<tr class="head">
<td >Date</td><td>Info</td><td>More</td>
</tr>
<tr><td>...</td></tr></table>
</div>
如何制作这个 css
#right table tr:first-child td:first-child {
border-top-left-radius: 10px;
}
#right table tr:first-child td:last-child {
border-top-right-radius: 10px;
}
仅适用于 .head
【问题讨论】:
-
你为什么不能直接使用
#right .head td:first-child {...}