-1

我使用以下 CSS 更改了表格交替行的颜色:

tr:nth-child(odd)    { background-color:#dedede; color: black; }
tr:nth-child(even)    { background-color:none; }

但我想使用 CSS 更改交替行中超链接的颜色。我尝试使用更改颜色

tr:nth-child(odd) a{ background-color:#dedede; color: black; }
tr:nth-child(even) a{ background-color:none; }

但这对我不起作用

请帮忙

4

1 回答 1

2

它工作正常亲爱的试试这个:

tr:nth-child(odd) a{ background-color:#dedede; color: #996633; }
tr:nth-child(even) a{ background-color:none; color : #FF0000}
于 2013-02-11T05:50:22.123 回答