Full Screen Video Background with content below the fold - HTML CSS CSS Property

HTML CSS examples for CSS Property:background

Description

Full Screen Video Background with content below the fold

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

#background {
   position: absolute;
   top: 50%;
   left: 50%;
   min-width: 100%;
   min-height: 100%;
   width: auto;
   height: auto;
   z-index: -100;<!--from  w ww  .j a v  a2s. c o m-->
   -webkit-transform: translateX(-50%) translateY(-50%);
   transform: translateX(-50%) translateY(-50%);
   background: url(https://www.java2s.com/style/demo/InternetExplorer.png) no-repeat;
   background-size: cover;
}
h1 {
   margin-top: 100vh;
}


      </style> 
 </head> 
 <body> 
  <div class="container-fluid"> 
   <div id="videoBG" class="row"> 
    <video autoplay loop muted poster="https://www.java2s.com/style/demo/Opera.png" id="background"> 
     <source src="http://your .mp4" type="video/mp4"> 
    </video> 
    <p id="mainHeader"> Header Title </p> 
   </div> 
  </div> 
  <div class="container-fluid"> 
   <div class="row"> 
    <h1> this is a tst</h1> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials