Reputation: 8602
http://www.w3css.co.uk/
The website says it doesn't use :target, I looked at the source there is no js as far as i can see so its all just css then ? How . A small fiddle example or an explanation would be very much appreciated.Thanks.
Upvotes: 3
Views: 1339
Reputation: 14808
The CSS selector that is being using on the thumbnails is the :focus
and :active
selectors, which are applied when you click on an anchor (active for IE compatibility, and what you'll see in Firebug).
These selectors simply have the CSS transitions that expand the squashed image to full size, then obviously the :focus
is lost when you click on another element and the lightbox disappears. You can also navigate using the tab keys as in doing so you are just switching the focus between the anchors and thus activating the CSS transitions again.
Upvotes: 2
Reputation: 43823
:active
pseudo class for IE, :focus
for non-IE as commented in the CSS.
Upvotes: 1
Reputation: 2101
The event that is firing to open the lightbox is the focus event. That is also why you can switch through the images by pressing tab or shift-tab. As Neil stated, you can find the details in the css file.
If you just load the site and press the tab button often enough to focus one of the pictures, the lightbox will also open.
Upvotes: 0