:last-of-type (selettore CSS e jQuery) riguarda gli elementi HTML che siano gli ultimi del tipo indicato. E’ uguale a :nth-last-of-type(1).
Sintassi
:last-of-type {
/* codice */
}
Esempi
<style>
p span:last-of-type {
background-color: yellow;
}
</style>
<p>Parola1 <span>Parola2</span> Parola3 <span>Parola4</span>.</p>
Parola1 Parola2 Parola3 Parola4.
Contenuti correlati
- CSS
- HTML
- JavaScript
- jQuery
- PHP
- SQL
- WORDPRESS
0 Comment