Thursday, May 14, 2015

CSS pseudo-class

A pseudo-class is used to define a special state of an element.

The :lang pseudo-class allows you to define special rules for different languages.
The :first-child pseudo-class matches a specified element that is the first child of another element.   

CSS Pseudo Elements like (::after, ::before, ::first-letter, ::first-line etc)
CSS Pseudo Classes like (:active, :enabled, :required, :valid, :focus etc)

:active       Adds a style to an element that is activated
:focus        Adds a style to an element that has keyboard input focus
:hover        Adds a style to an element when you mouse over it
:lang         Adds a style to an element with a specific lang attribute
:link         Adds a style to an unvisited link
:visited      Adds a style to a visited link

a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!!
a:active MUST come after a:hover in the CSS definition in order to be effective!!
Pseudo-class names are not case-sensitive.

No comments:

Post a Comment