仅将CSS样式设置为表格的第一行 [英] Set css style only to first row of the table
本文介绍了仅将CSS样式设置为表格的第一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用CSS的表的第一行使用不同的 tr
类名.
How to access with CSS first row of the table with different tr
class name.
<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{
border-top-left-radius: 10px;
}
#right .head td:last-child {
border-top-right-radius: 10px;
}
这篇关于仅将CSS样式设置为表格的第一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文