:target pseudo selector tutorial
There’s a good article online at Vitamin, Stay On :Target, about the CSS3 :target pseudo selector, which provides a good explanation and some working examples. :target is supported by all current browsers, except - well, I don’t need to say it, do I? - so you can start using it straight away.











Very interesting read, thanks.
I’m thinking of implementing this into my site (for tabs, as mentioned in the article), with a Javascript fallback for IE.
Actually, I’m noticing that none of the examples on that page work in Opera, and he notes in a few places that several of his examples only work in Firefox.
@Luke: I’ve tested in Opera 9.5 (Beta) and they all seem to work; can’t swear to whether it works in O9 or below.
Opera has support for :target in 9.5, but not in any earlier versions.
Doesn’t work in Opera 9.24 here.
Personally I prefer to use it with :not(), like here
http://www.w3.org/Style/Examples/007/target
Tutorial sobre el pseudo selector de CSS3 :target…
css3.info enlaza un tutorial acerca del pseudoselector :target con ejemplos de utilización….
CSS based tabs with not JS? Awesome.
The more and more advanced CSS gets it seems the more it replaces simple Javascript effects. :)