.parent
.child__img
.child__hover
.title
| my title
.desc
| my description
.parent{
position: relative;
}
.child__img{
тут код для картинки
}
.child__hover{
display: none;
}
.parent:hover .child__hover {
display: block;
position: absolute;
bottom: 0;
top: 0;
left: 0;
right: 0;
background: #ccc;
}
.title{
стиль заголовка
}
.desc{
стиль описания
}
$(function() {
var $togglers = $(".js-deps-popup");
return $togglers.on("click", function(e) {
var $this = $(this),
$item = $this.next(".dep"),
$active = $(".dep_show");
$item.toggleClass("dep_show");
$active.removeClass("dep_show");
e.stopPropagation();
});
});
$(function() {
$(document).click(function(e) {
var $togglersPopup = $(".dep__popup");
if (!$togglersPopup.is(e.target) &&
$togglersPopup.has(e.target).length === 0
) {
$(".dep").removeClass("dep_show");
}
});
});
@media (width: 1024px) {
.box-1,
.box-2 {
width: 50%;
}
.box-3 {
width: 100%;
}
.box-4,
.box-5 {
width: 50%;
}
}
@media (width: 768px) {
.box-1 {
width: 100%;
}
.box-2, .box-3, .box-4 {
width: 33%;
}
.box-5 {
width: 100%;
}
}