<div class="wrapper">
<ul class="gallery">
<li><a href="#" data-tooltip="Superman"><img src="http://www.cap-that.com/dc/superman/unbound/250x150image.jpg"/></a></li>
<li><a href="#" data-tooltip="Marvel"><img src="http://www.lifeofandroid.com//wp-content/uploads/2012/04/marvel-widget.jpg"/></a></li>
<li><a href="#" data-tooltip="Batman"><img src="http://cdn1-www.comingsoon.net/assets/uploads/1970/01/file_583520_batman-tired.jpg"/></a></li>
<li><a href="#" data-tooltip="Spiderman"><img src="http://cartoonexplorer.com/wp-content/photos/2014/07/New-spiderman-movie-250x150.jpeg"/></a></li>
</ul>
</div>
@import url(https://fonts.googleapis.com/css?family=Open+Sans:600);
body {
background:url('http://subtlepatterns2015.subtlepatterns.netdna-cdn.com/patterns/contemporary_china.png');
font-family: 'Open Sans', sans-serif;
font-weight:600;
text-align:center;
}
.wrapper {
margin: 0 auto;
margin-top:2%;
}
ul.gallery {
position: relative;
z-index: 1;
overflow: hidden;
list-style: none;
padding:5px;
}
ul.gallery li {
border:5px solid #fff;
position: relative;
display:inline-block;
width: 250px;
height: 150px;
margin: 0 30px 30px 0;
background: #fff;
-webkit-box-shadow: 0 1px 4px #ccc, 0 0 40px #ccc inset;
-moz-box-shadow: 0 1px 4px #ccc, 0 0 40px #ccc inset;
box-shadow: 0 1px 4px #ccc, 0 0 40px #ccc inset;}
ul.gallery li:before,
ul.gallery li:after {
content: '';
z-index: -1;
position: absolute;
left: 10px;
bottom: 10px;
width: 70%;
height: 55%;
-webkit-box-shadow: 0 15px 16px #6b6b6b;
-moz-box-shadow: 0 15px 16px #6b6b6b;
box-shadow: 0 15px 16px #6b6b6b;
-webkit-transform: skew(-15deg) rotate(-6deg);
-moz-transform: skew(-15deg) rotate(-6deg);
-ms-transform: skew(-15deg) rotate(-6deg);
-o-transform: skew(-15deg) rotate(-6deg);
transform: skew(-15deg) rotate(-6deg);
}
ul.gallery li:after {
left: auto;
right: 11px;
-webkit-transform: skew(15deg) rotate(6deg);
-moz-transform: skew(15deg) rotate(6deg);
-ms-transform: skew(15deg) rotate(6deg);
-o-transform: skew(15deg) rotate(6deg);
transform: skew(15deg) rotate(6deg);
}
a img {
border:none;
}
a {
position: relative;
text-decoration: none;
}
a:after {
content: attr(data-tooltip);
position: absolute;
bottom: 0%;
top;
left: 0;
background: #111;
padding: 5px 15px;
color: white;
font-family: 'Open Sans', sans-serif;
text-shadow: 0px 0px 1px #000;
white-space: nowrap;
opacity: 0;
-webkit-transition: all 0.4s ease;
-moz-transition : all 0.4s ease;
width:85;
}
a:before {
content: "";
position: absolute;
width: 0;
height: 0;
-webkit-transition: all 0.4s ease;
-moz-transition : all 0.4s ease;
opacity: 0;
left: 30%;
bottom: 90%;
}
a:hover:after {
bottom: 100%;
}
a:hover:before {
bottom: 70%;
}
a:hover:after, a:hover:before {
opacity: 1;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.