Full screen background video

Please sign up for the course before starting the lesson.

Tweet Step 1) Add HTML: Example <!-- The video --><video autoplay muted loop id="myVideo">  <source src="rain.mp4" type="video/mp4"></video> <!-- Optional: some overlay text to describe the video --><div class="content">  <h1>Heading</h1>  <p>Lorem ipsum...</p>  <!-- Use a button to pause/play the video with JavaScript -->  <button id="myBtn" onclick="myFunction()">Pause</button></div> Step 2) Add CSS: Example /* Style the video: 100% width and height to cover the entire window */#myVideo {  position: fixed;  right: 0;  bottom: 0; ...

Back to: HTML Course