Leyendas de imagen Hover animaciones con transiciones y transformaciones CSS3
| Autor: | hasinhayder |
|---|---|
| Views Total: | 9,325 |
| Sitio oficial: | Ir a la web |
| Actualizado: | December 11, 2013 |
| Licencia: | MIT |
Vista prévia
Descripción
En este tutorial vamos a crear animaciones flotantes con estilo y sutil imagen con transiciones CSS3 y transformación. No se necesita JavaScript adicional.
Uso básico
1. estructura de marcado HTML.
<ul class="caption-style-1"> <li> <img src="img/1.jpg" alt=""> <div class="caption"> <div class="blur"></div> <div class="caption-text"> <h1>Amazing Caption</h1> <p>Whatever It Is - Always Awesome</p> </div> </div> </li> </ul>
2. las reglas CSS.
.caption-style-1 {
list-style-type: none;
margin: 0px;
padding: 0px;
}
.caption-style-1 li {
float: left;
padding: 0px;
position: relative;
overflow: hidden;
}
.caption-style-1 li:hover .caption {
opacity: 1;
}
.caption-style-1 img {
margin: 0px;
padding: 0px;
float: left;
z-index: 4;
}
.caption-style-1 .caption {
cursor: pointer;
position: absolute;
opacity: 0;
-webkit-transition: all 0.45s ease-in-out;
-moz-transition: all 0.45s ease-in-out;
-o-transition: all 0.45s ease-in-out;
-ms-transition: all 0.45s ease-in-out;
transition: all 0.45s ease-in-out;
}
.caption-style-1 .blur {
background-color: rgba(0,0,0,0.65);
height: 300px;
width: 400px;
z-index: 5;
position: absolute;
}
.caption-style-1 .caption-text h1 {
text-transform: uppercase;
font-size: 24px;
}
.caption-style-1 .caption-text {
z-index: 10;
color: #fff;
position: absolute;
width: 400px;
height: 300px;
text-align: center;
top: 100px;
} Check out more examples:
- < a href = "/demo/image-caption-hover-animations-with-css3-transitions-and-transforms/" target = "_ blank" rel = "noopener" > ejemplo 1
- < a href = "/demo/image-caption-hover-animations-with-css3-transitions-and-transforms/index2.html" target = "_ blank" rel = "noopener" > ejemplo 2
- < a href = "/demo/image-caption-hover-animations-with-css3-transitions-and-transforms/index3.html" target = "_ blank" rel = "noopener" > ejemplo 3
- < a href = "/demo/image-caption-hover-animations-with-css3-transitions-and-transforms/index4.html" target = "_ blank" rel = "noopener" > ejemplo 4





