Figure Function
HTML
<div id="gallery">
<figure>
<img src="http://static.fanpage.it/techfanpage/wp-content/uploads/2012/10/eros-ramazzotti-il-5-novembre-live-su-google-e-youtube-416x277.jpg" width="200" height="150">
<figcaption>figura 2 1</figcaption><!---quello che ho inserito--->
</figure>
<figure>
<img src="http://cdn.blogosfere.it/hightech/images/google.jpg" width="200" heigth="150">
<figcaption>figura 1</figcaption><!---quello che ho inserito--->
</figure>
</div>
CSS
#gallery {
width: 100%;
max-width: 410px;
margin: 10px auto;
font: 85% verdana;
overflow: hidden;
}
#gallery figure {
float: left;
width: 200px;
height: 150px;
position: relative;
margin: 0 5px 0 0;
}
#gallery figure img {
display: block;
width: 100%;
height: 100%;
}
#gallery figure:after {
content: '+';
position: absolute;
bottom: 5px;
left: 5px;
width: 24px;
height: 24px;
line-height: 24px;
text-align: center;
background: rgba(0, 0, 0, 0.7);
color: #fff;
}
#gallery figcaption {
position: absolute;
bottom: 0;
padding: 10px 0;
text-align: center;
width: 100%;
left: 0;
z-index: 10;
color: #fff;
background: #aaa;
opacity: 0;
cursor: pointer;
-moz-transition: all 500ms ease-in;
-webkit-transition: all 500ms ease-in;
-o-transition: all 500ms ease-in;
-ms-transition: all 500ms ease-in;
transition: all 500ms ease-in;
}
#gallery figcaption:hover {
opacity: 1;
}