<div class="mainimage">
Beautiful sunset
</div>
@import url('https://fonts.googleapis.com/css2?family=Paytone+One&display=swap');
body {
background:#05243c;
}
.mainimage {
max-width: 600px;
margin: 0 auto;
background: url("https://picsum.photos/id/980/600/400") no-repeat center center;
-webkit-background-clip: text;
background-clip: text;
background-size: cover;
text-align: center;
font-family: 'Paytone One', sans-serif;
font-size: 100px;
line-height: 1em;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
color: transparent;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.