2 ms·
It's done by using the :target selector. Targeted images are lightboxed. There is a link in the lightbox that resets the target to dismiss the lightbox. Crudely
by dpatru 16y ago
It's done by using the :target selector. Targeted images are lightboxed. There is a link in the lightbox that resets the target to dismiss the lightbox. Crudely:
css:
a.lb:target {display:block; text-align:center;}
a.lb {display:none;}
html:
<a href="#img">show image</a>
<a class="lb" href="#" id="img"><img src="image.jpg"></a>