Check out this amazing example demonstrating how to display a full-screen video using only CSS with <video>
tag, along with text overlaid on the image by utilizing position: absolute
.
CSS:
.videoInsert {
position: absolute;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
background-size: cover;
overflow: hidden;
}
h2 span {
color: white;
font: bold 24px/45px Helvetica, Sans-Serif;
letter-spacing: -1px;
background: rgb(0, 0, 0);
background: rgba(0, 0, 0, 0.7);
padding: 10px;
z-index: 999999999999;
position: absolute;
margin:auto;
left:0;
right:0;
top:0;
bottom:0;
height: 100px;
width: 80%;
text-align: center;
}
HTML:
<div class="wrapper">
<video class="videoInsert">
<source src="http://www.example.com/video.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">Your browser does not support the video tag.
</video>
</div>
<h2><span>A beautiful nature video:<br />Enjoy!</span></h2>