Dynamic pseudo-classes provide various type of special effects to the A element of HTML. these classes represent the state of links as unvisited, visited, or currently selected. Dynamic pseudo-classes also enable you to activate the HTML elements or apply a specified style to an element when the mouse pointer is kept over it. The dynamic pseudo-classes include :link, :visited, :hover, :active, and :focus.
Example of Dynamic pseudo-classes are:
a:link /*unvisited links*/
a:visited /*visited*/
a:hover /* user hovers*/
a:active /*active links */
We can also combine Dynamic pseudo-classes in one line for an element.
For example:
a:focus:hover
Pseudo-class | Description |
---|---|
:link
|
Applies styles to non visited links
|
:visited
|
Applies styles to visiteds
|
:hover
|
Applies styles to an element over which the mouse-pointer moves
|
:active
|
Applies styles to an active element
|
:focus
|
Applies styles to an element during the period it has user focus
|
Example of Dynamic pseudo-classes are:
a:link /*unvisited links*/
a:visited /*visited*/
a:hover /* user hovers*/
a:active /*active links */
We can also combine Dynamic pseudo-classes in one line for an element.
For example:
a:focus:hover
No comments:
Post a Comment