figure.cp_caption {
position: relative;
overflow: hidden;
width: 100%;
min-width: 220px;
max-width: 300px;
max-height: 220px;
margin: 10px 1%;
text-align: center;
color: #fff;
background: rgba(27, 37, 56, 1);
}
figure.cp_caption * {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
figure.cp_caption img {
width: 100%;
-webkit-transition: opacity 0.3s;
transition: opacity 0.3s;
opacity: 1;
}
figure.cp_caption figcaption {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
padding: 3em 3em;
}
figure.cp_caption figcaption::before {
position: absolute;
top: 50%;
right: 30px;
bottom: 50%;
left: 30px;
content: '';
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
opacity: 0;
border-top: 1px solid rgba(255, 255, 255, 0.8);
border-bottom: 1px solid rgba(255, 255, 255, 0.8);
background-color: #fff;
}
figure.cp_caption h2,
figure.cp_caption1 p {
margin: 0 0 5px;
-webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
transition: opacity 0.3s, transform 0.3s;
opacity: 0;
}
figure.cp_caption a {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
color: #fff;
}
figure.cp_caption:hover img {
opacity: 0.35;
}
figure.cp_caption:hover figcaption h2 {
-webkit-transition-delay: 0.3s;
transition-delay: 0.3s;
-webkit-transform: translate3d(0%, 0%, 0);
transform: translate3d(0%, 0%, 0);
opacity: 1;
}
figure.cp_caption:hover figcaption p {
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
opacity: 0.9;
}
figure.cp_caption:hover figcaption::before {
top: 30px;
bottom: 30px;
-webkit-transition-delay: 0s;
transition-delay: 0s;
opacity: 1;
background: rgba(27, 37, 56, 0);
}