cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv headernumbered-list123split-screen
user profile image

Here is a pure CSS lightbox made possible by use of the :target CSS selector.


  1. This is exactly what I wanted to do, but how can you make it work with more than one image ?

  2. Great concept, Gegory!

    Nicolas @SV70DIN I have forked this pen and added 9 images (using 10 images then), so you can see how to add more images. I have also added a CSS transition. You may find it here: 10 image pure CSS Lightbox

  3. @media надо. На маленьком экране в лайтбоксе фотка уменьшается.

  4. nicely done. Now I want bacon.

  5. Love it. Made a fork and added to it with gallery and some nice looking lightboxy features, next/prev buttons, etc. http://codepen.io/ryandunn/pen/zGJWzv

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.