Wiiii~~ ¡Vamos a ello!Un efecto muuuuuuy lindo para imagenes, donde les puedes poner una leyenda o descripción, que será visible al pasar el cursor sobre la imagen ^^
figure {
display: block;
position: relative;
float: left;
overflow: hidden;
margin: 0 10px 10px 0;
-moz-transition: all 0.6s ease;
}
figcaption {
position: absolute;
margin-bottom: 10px;
background-color: #000000;
color: #FFFFFF;
padding: 3px 3px;
opacity: 0;
-webkit-transition: all 0.8s ease;
-moz-transition: all 0.8s ease;
-o-transition: all 0.8s ease;
}
figure:before {
content: "?";
position: absolute;
font-weight: 800;
background: #ff55a9;
text-shadow: 0 0 5px white;
color: #FFF;
width: 24px;
height: 24px;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
text-align: center;
font-size: 14px;
line-height: 24px;
-moz-transition: all 0.6s ease;
opacity: 0.75;
}
figure:hover figcaption { opacity: 0.9; }
figure:hover:before { opacity: 0; }
.cap-left:before { bottom: 10px; left: 10px; }
.cap-left figcaption { bottom: 0; left: -30%; }
.cap-left:hover figcaption { left: 0; }
Leyenda:3. ¡Oye, que yo quiero insertarlo! Pues en el gadget, entrada, lugar donde quieras utiliza:
float: left;
Posición de la imagen (rigth o left)
background: #ff55a9;:
Color del fondo del botón "?"
color: #FFFFFF;:
Color del símbolo del botón "?"
content: "?";:
Simbolito que quieras añadirle (entre comillas)
background-color: #000000;:
Color del fondo de la leyenda.
color: #FFF;: Color del texto de la leyenda
<figure class="cap-left">
<img src="URLDELAIMAGEN" alt="" />
<figcaption>Mi texto</figcaption>
</figure>
ラベル: XHTML y CCS