Pure CSS LightBox, no javascript
Posted on Thursday, February 21st, 2008 at 10:07 am
Current Javascript solutions for LightBoxes are kind of cumbersome, bloated, and CPU-intense.
Unsatisfied with the current state of LightBoxing, I developed a pure, organic, CSS-powered LightBox. Absolutely zero javascript. All of this under 1kb.
Click here to preview the CSS LightBox
The core of Multi-state CSS is the
Unsatisfied with the current state of LightBoxing, I developed a pure, organic, CSS-powered LightBox. Absolutely zero javascript. All of this under 1kb.
Click here to preview the CSS LightBox
The core of Multi-state CSS is the
:target pseudo class. When a user clicks a page-anchor the :target pseudo class is activated, revealing the lightbox element. Here's the code:
div.lb {
display: none;
}
div.lb:target {
display: block !important;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
text-align: center;
background: url('screen.png');
position: fixed;
padding: 2em;
}
Related posts
- CSS selectors for AS3
- How Dylan avoids widows
- Why I hate MySpace
- Curry gives me the best ideas
- First post
2 comments
Search
Tag Cloud
ajax as3 businesscard captcha chumby css design fap fapi flash hack hotlinking interface javascript jquery json lightbox myspace pipes site translation typography usability webservice wigits xss yahoo
Comment from Justin
Posted on Tuesday, July 22nd, 2008 at 11:51 am
Comment from DekenFrost
Posted on Thursday, July 3rd, 2008 at 1:17 am