Tue May 24 2022
Clip Text with Background Image
CSS4908 views
File Name: clip-text-with-bg-img.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Clip Text with Background Image</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Kanit:wght@700&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
}
body { background-color: #383838; }
section {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
}
h1 {
font-family: 'Kanit', sans-serif;
font-size: 200px;
font-weight: bold;
background-image: url('https://cdn.pixabay.com/photo/2015/03/01/05/52/taiwan-654398_960_720.jpg');
background-position: center;
background-repeat: no-repeat;
background-size: contain;
background-clip: text;
-webkit-background-clip: text;
color: transparent;
filter: drop-shadow(0 0 3px #fff);
}
</style>
</head>
<body>
<section>
<h1>Geekboots</h1>
</section>
</body>
</html>
Result Screenshot(s)
Author:Geekboots