E:last-of-type

ある親要素の、兄弟関係にある E要素の最後 E要素に対してスタイルが適用されます。E:nth-last-of-type(1) と同じです。

example

tr > td:last-of-type { background-color: skyblue; } /* 表の行 tr の最後のセル td */

source

<table>
 <tr>
  <td> セル </td>
  <td> セル </td>
  <td> 最後のセル </td>
 </tr>
</table>

display

セル セル 最後のセル
上に戻る