Eklablog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU

Tutorial, CSS, HTML

 


Fuente

Los dioses ayudan a los hombres que se ayudan a sí mismos, y esto es mediante el trabajo. Virgilio

HTML

 <div class="imagepluscontainer" style="z-index: 2;">
<p><img style="border: 2px double #b7d9fa; border-radius: 8px; -webkit-box-shadow: #6d3112 3px 3px 9px; box-shadow: #6d3112 3px 3px 11px; display: block; margin-left: auto; margin-right: auto;" src="https://lh6.googleusercontent.com/-dy6eflBlE2o/VOdyIloF99I/AAAAAAABc4o/lG0DJAbHW1U/w191-h300-no/1-191x300.gif" alt="" width="220" height="290" /></p>
<div class="desc">Texto</div></div>



CSS

 <style>
 .imagepluscontainer{ 
position: relative;width: 200px;
z-index: 1;
}
.imagepluscontainer img{ 
position: relative;
z-index: 2;
-moz-transition: all 0.5s ease; 
-webkit-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}

.imagepluscontainer:hover img{ 
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
-moz-transform: scale(1.05, 1.05);
-webkit-transform: scale(1.05, 1.05);
-ms-transform: scale(1.05, 1.05);
-o-transform: scale(1.05, 1.05);
transform: scale(1.05, 1.05);
}

.imagepluscontainer div.desc{ /* CSS for desc div of each image. */
position: absolute;
width: 90%;
z-index: 1; /* Set z-index to that less than image's, so it's hidden beneath it */
bottom: 0; /* Default position of desc div is bottom of container, setting it up to slide down */
left: 5px;
padding: 8px;
background: rgba(255, 255, 255, 0.8); color: #000;
     font-family: "Edwardian Script ITC";
     font-size: 22px;
-moz-border-radius: 0 0 8px 8px;-webkit-border-radius: 0 0 8px 8px;
border-radius: 0 0 8px 8px;
opacity: 0; /* Set initial opacity to 0 */
-moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.8); 
-webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
-moz-transition: all 0.5s ease 0.5s; 
-webkit-transition: all 0.5s ease 0.5s;
-o-transition: all 0.5s ease 0.5s;
-ms-transition: all 0.5s ease 0.5s;
transition: all 0.5s ease 0.5s;
}

.imagepluscontainer div.desc a{
color: white;
}

.imagepluscontainer:hover div.desc{ 
-moz-transform: translate(0, 100%);
-webkit-transform: translate(0, 100%);
-ms-transform: translate(0, 100%);
-o-transform: translate(0, 100%);
transform: translate(0, 100%);
opacity:1; /* Reveal desc DIV fully */
}
 </style>



Retour à l'accueil
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article