Sign in
Log inSign up
What are some useful css pseudo classes/elements you use in your code?

What are some useful css pseudo classes/elements you use in your code?

Alkshendra Maurya's photo
Alkshendra Maurya
·Jan 21, 2016

I recently came across this really intelligent implementation of :target class (here) and realised that there are so many useful psuedo classes that I'm not using..

There are about 40 psuedo classes and elements described in MDN docs (developer.mozilla.org/en-US/docs/Web/CSS/P… and developer.mozilla.org/en-US/docs/Web/CSS/p…)

What are some psuedo classes you use while writing your CSS? and what are some use cases where these come in handy?