JSFiddle - React, Tailwind, and code Playground
HTML
<div class="box">
<header>
<h1>
Mickey and Minnie
</h1>
</header>
</div>
CSS
* {
box-sizing: border-box;
}
h1 {
font-family: sans-serif;
}
.box {
background: url(http://images6.fanpop.com/image/photos/32100000/Random-photography-32132064-495-356.jpg);
background-attachment: fixed;
width: 470px;
height: 335px;
position: relative;
margin: 20px;
}
.box > header {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 20px 10px;
background: inherit;
overflow: hidden;
}
.box > header::before {
content: "";
width: 200%;
height: 200%;
background: inherit;
background-attachment: fixed;
}
.box > header::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color:rgb(0,0,0);
}
.box > header > h1 {
margin: 0;
color: white;
position: relative;
z-index: 1;
}