<table>
<tr>
<th> </th>
<td>$</td>
<td> </td>
</tr>
<tr>
<th> </th>
<td>$</td>
<td> </td>
</tr>
<tr>
<th> </th>
<td>$</td>
<td> </td>
</tr>
<tr>
<th> </th>
<td>$</td>
<td> </td>
</tr>
<tr>
<th> </th>
<td>$</td>
<td> </td>
</tr>
</table>
Ecco il mio codice, voglio <td>
s con "$" con uno sfondo di #CCC
in tutte le <tr>
s.utilizzando nth-child in tabelle tr td
Qualcuno può aiutarmi a farlo utilizzando nth-child
, pseudo classi?
tavolo tr td: nth-child (2) { sfondo: #ccc; } questo codice non funziona per me –
Ma seleziona tutto il td non solo il 2 ...? Come posso selezionare solo il secondo figlio? – alonblack