Tags: target



Building a CSS-only image gallery (with fallbacks)

A great step-by-step walkthrough of building a really nice image gallery without any JavaScript.

The end result is really impressive but there’s still the drawback that the browser history will be updated every time you click on an image thumbnail (because the functionality relies on ID attributes referenced via :target). Depending on your use-case, that may or may not be desirable.

If it weren’t for retargeting, we might not have ad blocking

The more I reflect on the current practices of the online advertising industry, the more I think that ad-blocking is a moral imperative.

The :target Trick

An alternative to using the :checked pseudo-class for sprinkling in some behaviour—you can use the :target pseudo-class. It might mess up the browser history though.

Vitamin Features » Stay on :target

Brian shows some clever uses of the little-known :target pseudo-class.