CODICE
/* Codice prelevato da jackforum.forumcommunity.net - Nick Santini */
/* The CSS that matters */
.lb {
display: none;
position: fixed!important;
z-index: 999;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: rgba(0,0,0,0.8);
text-align:center;
}
.lb img {
max-width: 90%;
max-height: 80%;
margin-top: 2%;
}
.lb:target {
outline: none;
display: block;
}
a.lb:hover {cursor:default;}
img:hover {cursor:pointer;}
/**** The CSS that doesn't matter ****/
html {
background: #222;
text-align:center;
}
h1 {
font:50px Helvetica, Arial, Sans-Serif;
color:#ccc;
text-shadow: 0 1px 0 #ccc,
0 2px 0 #c9c9c9,
0 6px 1px rgba(0,0,0,.1),
0 0 5px rgba(0,0,0,.1),
0 1px 3px rgba(0,0,0,.3),
0 3px 5px rgba(0,0,0,.2),
0 5px 10px rgba(0,0,0,.25),
0 10px 10px rgba(0,0,0,.2),
0 20px 20px rgba(0,0,0,.15);
}
HTML
<h1>CSS Only Lightbox</h1>
<h1 style="font-size: 18px; text-shadow: none">
jackforum.forumcommunity.net
</h1>
<!-- img one -->
<a href="#one">
<img src="http://cdn.morguefile.com/imageData/public/files/h/hilarycl/09/l/1410712764ijmwo.jpg" align="left" width="25%">
</a>
<!-- img one hidden -->
<a href="#_" class="lb" id="one">
<img src="http://cdn.morguefile.com/imageData/public/files/h/hilarycl/09/l/1410712764ijmwo.jpg">
</a>
<!-- img two -->
<a href="#two">
<img src="http://cdn.morguefile.com/imageData/public/files/t/ttronslien/06/l/1403053742bhoxu.jpg" align="left" width="25%">
</a>
<!-- img two hidden -->
<a href="#_" class="lb" id="two">
<img src="http://cdn.morguefile.com/imageData/public/files/t/ttronslien/06/l/1403053742bhoxu.jpg">
</a>
<!-- img three -->
<a href="#three">
<img src="http://cdn.morguefile.com/imageData/public/files/b/butkovicdub/12/l/1386540417x3g0q.jpg" align="left" width="25%">
</a>
<!-- img three hidden -->
<a href="#_" class="lb" id="three">
<img src="http://cdn.morguefile.com/imageData/public/files/b/butkovicdub/12/l/1386540417x3g0q.jpg">
</a>
<!-- img four -->
<a href="#four">
<img src="http://cdn.morguefile.com/imageData/public/files/c/ChntX/12/l/1418256005vn45t.jpg" align="left" width="25%">
</a>
<!-- img four hidden -->
<a href="#_" class="lb" id="four">
<img src="http://cdn.morguefile.com/imageData/public/files/c/ChntX/12/l/1418256005vn45t.jpg">
</a>