Length 59:24Create a CSS only lightbox using :target
About this video
A tutorial showing how to build a lightbox effect with CSS alone, using the :target pseudo-class instead of JavaScript. It also covers the limitations of this approach when there are many items.
What you’ll learn
- Build a lightbox that opens with the CSS :target pseudo-class
- Compare CSS-only interactions with JavaScript-based ones
- Recognise the limits of :target when a page has many items










