<div class="video-mask-container">
<video class="bg-video" autoplay muted loop playsinline>
<source src="https://codeshack.io/web/example.mp4" type="video/mp4">
</video>
<div class="text-mask-layer">
<h1>CREATIVE</h1>
<h1>VISION</h1>
</div>
</div>*, *::before, *::after {
box-sizing: border-box;
}
body {
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
margin: 0;
background: #000000;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.video-mask-container {
position: relative;
width: 100%;
height: 100vh;
overflow: hidden;
}
.bg-video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 1;
}
.text-mask-layer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
/* Pure black background with white text, utilizing multiply blend mode, completely reveals the video purely inside the text strokes */
background: #000000;
color: #ffffff;
mix-blend-mode: multiply;
z-index: 2;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
}
.text-mask-layer h1 {
font-size: clamp(4rem, 12vw, 15rem);
font-weight: 900;
line-height: 0.9;
margin: 0;
letter-spacing: -2px;
text-transform: uppercase;
}Nothing to show yetType HTML, CSS or JavaScript and your page appears here.
Click any element to find its code Esc
Check this code before you run it
It came from a shared link. It runs with fewer permissions, so it cannot open pop-ups, submit forms or start downloads.
0.00s / 0.00s
Nothing has animated yet. Hover, click or type in the preview and each CSS animation, transition or
element.animate() call shows up here as it plays.