How To Use CSS3 Pseudo-Classes

Posted: April 2, 2011 in CSS, Form
Tags: , , , , , ,

The newer version of CSS is to be launched as CSS 3.0 is having new boost Technics make you way of coding very simpler. CSS 3.0 provides new Pseudo-classes which are mentioned in this post.

These are like:

  • :link
  • :visited
  • :hover
  • :active
  • :first-child
  • :last-child
  • :root
  • :nth-child() __used as ul li:nth-child(odd), :nth-child(even), :nth-child(3), :nth-child(2n) :nth-child(5n), :nth-child(4n + 1)
  • :nth-last-child(n)
  • :nth-of-type(n)
  • :nth-last-of-type(n)
  • :first-of-type and :last-of-type
  • ;only-of-type
  • :last-child
  • ;only-child
  • :empty
  • :target
  • :checked, :enabled and :disabled
  • :not __used like input:not([type=radio])

View Full Tutorial with Examples Here

Resource : smashingmagazine.com

Advertisements
Comments
  1. Rick Lamers says:

    Useful article about pseudo selectors 🙂 To bad CSS3 spec isn’t universal across all of the browsers.

    Nice site though 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s