<section>
<div class="container">
<img src="https://www.thetimes.co.uk/imageserver/image/%2Fmethode%2Ftimes%2Fprod%2Fweb%2Fbin%2F80b8c7d4-ac66-11e8-8404-0bee60a6f70d.jpg?crop=2000%2C1333%2C0%2C40" />
<div class="text">
<h1>The Meerkats</h1>
<h2>RADIO</h2>
</div>
</div>
</section>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
section {
--multiply-mode: hotpink;
--lighten-mode: blue;
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.container {
&:hover {
--multiply-mode: lime;
--lighten-mode: midnightblue;
}
position: relative;
width: 60vw;
min-width: 350px;
height: 60vw;
min-height: 350px;
&::before,
&::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
transition: background 1s;
}
&::before {
background: var(--multiply-mode);
mix-blend-mode: multiply;
}
&::after {
background: var(--lighten-mode);
mix-blend-mode: lighten;
}
}
img {
object-fit: cover;
height: 100%;
width: 100%;
filter: grayscale(1);
}
.text {
position: absolute;
bottom: 0;
left: 0;
padding: 40px;
z-index: 4;
color: white;
font-family: HelveticaNeue, Open Sans, sans-serif;
text-align: right;
width: 100%;
h1 {
font-size: 50px;
}
h2 {
letter-spacing: 2px;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.