figure.cp_caption {
position: relative;
overflow: hidden;
width: 100%;
min-width: 220px;
max-width: 300px;
max-height: 220px;
margin: 10px 1%;
text-align: right;
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: 30px 3em;
}
figure.cp_caption figcaption::before {
position: absolute;
top: 30px;
right: 100%;
bottom: 30px;
left: 30px;
content: '';
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
opacity: 0;
border-right: 4px solid rgba(255, 255, 255, 0.8);
background-color: rgba(255, 255, 255, 0.5);
}
figure.cp_caption h2,
figure.cp_caption p {
margin: 0 0 5px;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
opacity: 0;
}
figure.cp_caption h2 {
-webkit-transition-delay: 0s;
transition-delay: 0s;
-webkit-transform: translate3d(-30%, 0%, 0);
transform: translate3d(-30%, 0%, 0);
}
figure.cp_caption p {
-webkit-transition-delay: 0s;
transition-delay: 0s;
-webkit-transform: translate3d(0%, -30%, 0);
transform: translate3d(0%, -30%, 0);
}
figure.cp_caption a {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
color: #fff;
}
figure.cp_caption:hover img {
opacity: 0.3;
}
figure.cp_caption:hover figcaption h2,
figure.cp_caption:hover figcaption p {
visibility: visible;
}
figure.cp_caption:hover figcaption h2 {
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
-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;
-webkit-transform: translate3d(0%, 0%, 0);
transform: translate3d(0%, 0%, 0);
opacity: 0.9;
}
figure.cp_caption:hover figcaption::before {
right: 30px;
-webkit-transition-delay: 0s;
transition-delay: 0s;
opacity: 1;
background: rgba(255, 255, 255, 0);
}