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;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: left;
}
figure.cp_caption figcaption > div {
position: relative;
float: left;
overflow: hidden;
width: 50%;
height: 100%;
}
figure.cp_caption figcaption::before {
position: absolute;
top: 50%;
bottom: 50%;
left: 50%;
width: 2px;
content: '';
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
opacity: 0;
background-color: rgba(255, 255, 255, 0);
}
figure.cp_caption h2,
figure.cp_caption p {
position: absolute;
top: 0;
left: 0;
width: 100%;
margin: 0;
padding: 20px;
-webkit-transition: opacity 0.4s, -webkit-transform 0.4s;
transition: opacity 0.4s, transform 0.4s;
opacity: 0;
}
figure.cp_caption h2 {
bottom: 0;
display: inline-block;
-webkit-transition-delay: 0s;
transition-delay: 0s;
-webkit-transform: translate3d(50%, 0%, 0);
transform: translate3d(50%, 0%, 0);
text-align: right;
word-spacing: -0.1em;
background: rgba(0, 0, 0, 0.5);
}
figure.cp_caption p {
font-weight: 300;
top: 0;
bottom: 0;
display: block;
-webkit-transition-delay: 0s;
transition-delay: 0s;
-webkit-transform: translate3d(-50%, 0%, 0);
transform: translate3d(-50%, 0%, 0);
text-align: left;
color: rgba(27, 37, 56, 1);
background: #fff;
}
figure.cp_caption a {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
color: #fff;
}
figure.cp_caption:hover img {
opacity: 0.7;
}
figure.cp_caption:hover figcaption h2,
figure.cp_caption:hover figcaption p {
-webkit-transition-delay: 0.3s;
transition-delay: 0.3s;
-webkit-transform: translate3d(0%, 0%, 0);
transform: translate3d(0%, 0%, 0);
}
figure.cp_caption:hover figcaption h2 {
opacity: 1;
}
figure.cp_caption:hover figcaption p {
opacity: 1;
}
figure.cp_caption:hover figcaption::before {
top: 0;
bottom: 0;
-webkit-transition-delay: 0s;
transition-delay: 0s;
opacity: 1;
background: #fff;
}