<link rel="stylesheet" href="style.css" type="text/css" media="video/mp4" /> </head> <!-- The video --> <video autoplay muted loop id="myVideo"> <source src="videobg.mp4" type="video/mp4"> </video> #myVideo { position: fixed; right: -50; bottom: 0; min-width: 100%; min-height: 100%; } <script> var video = document.getElementById("myVideo"); </script>