If you do not want to use frameworks I propose the following solution:
Use a div container of the image and a div brother of the image where the description of the hover event is stored.
then capture the hover event for the parent div, to hide and move the div of the description with css and jquery.
Another option is to use animate.css to perform the effects of movement.
HTML:
<body>
<div class="contenedorImg">
<img src="http://lorempixel.com/400/200/" />
<div class="contenedorDescripcion">Contenido de la descripción</div>
</div>
</body>
CSS:
body{
margin: 0;
}
.contenedorImg{
width: 400px;
}
.contenedorDescripcion {
color : #FFF;
width: 400px;
height: 200px;
position: absolute;
top:200px;
left:0;
background: rgba(0,0,0,0.5);
visibility: hidden;
transition: top 0.5s;
}
.muestraDescripcion{
top: 0 !important;
}
.hidden{
visibility: hidden !important;
}
.visible{
visibility: visible !important;
}
Javascript (JQuery)
$(document).ready(function(){
$(".contenedorImg").hover(
function(){
$(".contenedorDescripcion").addClass("visible muestraDescripcion");
},
function(){
$(".contenedorDescripcion").removeClass("muestraDescripcion");
setTimeout(
function(){
$(".contenedorDescripcion").removeClass("visible muestraDescripcion");
$(".contenedorDescripcion").addClass("hidden");
}, 300);
}
);
});
Check the example walking, the mouseleave to download the div can behave a little weird, but just a little more code js!
link