Full screen image background on header - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Header

Description

Full screen image background on header

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">

body{<!--from  ww w  . j ava  2  s .c o  m-->
   margin:0px;
}
.intro{
   position: absolute;
   height: 100%;
   width: 100%;
   background-size: cover;
}
.bg{
   position:absolute;
   z-index:-1;
   width:100%;
   height:100%;
}


      </style> 
 </head> 
 <body> 
  <div class="row intro"> 
   <img class="bg" src="https://www.java2s.com/style/demo/Google-Chrome.png"> 
   <div class="col-xs-12"> 
    <h1 class="h2-cover"> this is a test <strong>test tes test</strong> </h1> 
    <p class="line-cover"> this is a test test test test test test </p> 
    <a href="#" class="button round alert">test test test</a> 
    <a href="#" class="button round morelighter">cat cat cat cat cat</a> 
   </div> 
  </div> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> 
  <br> test  
 </body>
</html>

Related Tutorials