MDN wants to talk to developers like you: https://qsurvey.mozilla.com/s3/8d22564490d8

:last-child

This translation is incomplete. Please help translate this article from English.

Sumari

La pseudo-classe CSS :last-child representa qualsevol element sent l'últim element fill del seu pare.

Sintaxi

:last-child { style properties }

Exemple

Contingut HTML

<ul>
  <li>This item is not limed.</li>
  <li>Also not this one.</li>
  <li>This item is! :)</li>
</ul>

Contingut CSS

li:last-child {
  background-color: lime;
}

Especificacions

Especificació Estat Comentari
Selectors Level 4
The definition of ':last-child' in that specification.
Working Draft Sense canvis
Selectors Level 3
The definition of ':last-child' in that specification.
Recommendation Definició inicial

Característica Chrome Firefox (Gecko) Internet Explorer Opera Safari
Suport bàsic 1.0 1.0 (1.7 or earlier) 9.0 9.5 3.2
Característica Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Suport bàsic 2.1 1.0 (1) 9.0 10.0 3.2

Veure

Document Tags and Contributors

 Contributors to this page: Legioinvicta
 Last updated by: Legioinvicta,