<div class="fullscreen-video-container">
<video autoplay loop muted>
<source src="https://www.dropbox.com/scl/fi/eg0c3th4vyjnnz09cwxam/22512-328261507_tiny.mp4?rlkey=sk0uvs93a3uby17qbzdx1c3cx&raw=1" type="video/mp4">
>
</video>
<div class = 'fullscreen-video-content'>
<h1> Some text</h1>
</div>
</div>
* {
margin: 0;
padding: 0;
}
.fullscreen-video-container {
position: relative;
height: 100vh;
width: 100vw;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
}
.fullscreen-video-container video {
position: absolute;
width: auto;
height: auto;
min-width: 100%;
min-height: 100%;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
z-index : -1;
}
.fullscreen-video-content {
background-color: rgba(255,255,255,0.8);
padding: 30px;
border-radius: 5px;
}
.fullscreen-video-content h1 {
font-size: 3rem;
font-weight: 700;
margin: 0;
color: #333;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.