Creating Pseudo-Classes

CSS also defines a number of pseudo-classes. Here's a sampling of pseudo-classes that can act as selectors:

  • :focus Refers to the element with the focus (the item that is the target of keystrokes). For example, P:focus selects the <P> element with the focus.

  • :first-child Refers to the first child of the indicated element. For example, P:first-child selects the first child of the <P> element.

  • :link :visited , :active , :hover , Refer to hyperlink-like elements. The :link pseudo-class refers to elements that have been designated as links, :visited specifies the style of visited links, :active specifies the style of links as they're being activated, and :hover specifies the style as the mouse hovers over them.

  • :lang() Refers to elements that use a specified language. The language is usually set in elements with the xml:lang attribute.



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net