1. Computing

Discuss in my forum

Jennifer Kyrnin

Poll: Do you use pseudo-elements or pseudo-classes in your CSS?

By , About.com GuideOctober 25, 2012

Follow me on:

Pseudo-classes and pseudo-elements were added to CSS in version 2.1 and even more were added in CSS3. These style selectors are a way to give you more flexibility in what part of an element or class of element you want to style. For example, the most commonly used pseudo-classes are used on links to change how the link looks when it was visited (:visisted pseudo-class) or when someone mouses over the link (:hover pseudo-class). In fact, you may have used those pseudo-classes without even knowing they were pseudo-classes. Do you use pseudo-elements and/or pseudo-classes? Do you have any favorites? Share in the comments.

Some Pseudo-Elements and Pseudo-Classes You May Not Know

  • :lang--To style elements with different languages differently.
  • :not--To style every element except the one defined.
  • :nth-child--To style child elements that match a numerical pattern (the third child, all even children, etc.)
  • ::selection--To style content on a page when a reader highlights or selects it.
Comments
No comments yet. Leave a Comment
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>
Top Related Searches jueves octubre poll elements

©2013 About.com. All rights reserved.