CSS-Only-Lightbox-Close-Button
CSS-Only-Lightbox-Close-Button copied to clipboard
Why are we still using images?
CSS-Only Lightbox-style close buttons
I was rolling my own lightbox JavaScript and needed a close button. I realized that I didn’t really need an image as I began replacing the one I had temporarily "borrowed" from a Google Image search (I'm a professional, I couldn't leave it like that!).
- Check out the demo here!
- Ready-to-use CSS
- LESS -- ready for your mixin pleasure -- included!
Known Issues
The shadow size and offset does not vary with each button size. This is due to a bug in Less. Manually correcting this is straightforward.