exploring this
solution1
=============================================
solution2
demo
markup
<div id="content">
<h1>PARIS</h1>
</div>
styling
h1, p { margin: 0; }
#content {
padding: 20px 20px 100px;
margin: 50px;
position: relative;
}
#content h1 {
/* has same bg as #content */
background: url(http://example.com/content/images/paris.jpg);
font-size: 12em;
font-family: impact;
left: 0;
line-height: 100%;
padding-top: 25px;
position: absolute;
text-align: center;
top: 0;
width: 100%;
text-fill-color: transparent;
background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}
================
solution3
styling
body {
font: normal 16px/1.5 Arial, sans-serif;
}
h1, p {
margin: 0;
padding: 0 0 .5em;
}
.box {
margin: 0 auto;
max-width: 480px;
}
.caption {
position: relative;
overflow: hidden;
-webkit-transform: translateZ(0);
transform: translateZ(0);
}
.caption::before {
content: ' ';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: transparent;
transition: background .35s ease-out;
}
.caption:hover::before {
background: rgba(0, 0, 0, .5);
}
.caption__image {
display: block;
min-width: 100%;
max-width: 100%;
height: auto;
}
.overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 10px;
color: white;
-webkit-transform: translateY(100%);
transform: translateY(100%);
transition: -webkit-transform .35s ease-out;
transition: transform .35s ease-out;
}
.caption:hover .overlay {
-webkit-transform: translateY(0);
transform: translateY(0);
}
.overlay__title {
-webkit-transform: translateY( -webkit-calc(-100% - 10px) );
transform: translateY( calc(-100% - 10px) );
transition: -webkit-transform .35s ease-out;
transition: transform .35s ease-out;
}
.caption:hover .overlay__title {
-webkit-transform: translateY(0);
transform: translateY(0);
}
demo