I selettori di pseudo-classi sono preceduti da un segno di due punti (:
) e riguardano uno stato o condizione particolare in cui si trova l’elemento (ad es., un link già visitato o no).
I selettori di pseudo-elementi sono preceduti da un doppio segno di due punti (::
) e riguardano parti specifiche di un elemento (ad es., la prima lettera o riga).
:active
::after
:animated
::before
:button
:checkbox
:checked
:contains()
:disabled
:empty
:enabled
:eq()
:even
:file
:first
:first-child
::first-letter
::first-line
:first-of-type
:focus
:gt()
:has()
:header
:hidden
:hover
:image
:in-range
:input
:invalid
:lang()
:last
:last-child
:last-of-type
:link
:lt()
:not()
:nth-child()
:nth-last-child()
:nth-last-of-type()
:nth-of-type()
:odd
:only-child()
:only-of-type
:optional
:out-of-range
:parent
:password
:radio
:read-only
:read-write
:required
:reset
:root
:selected
::selection
:submit
:target
:text
:valid
:visible
:visited
0 Comment