Css background full height and 100% width on mobile landscape mode - HTML CSS CSS Property

HTML CSS examples for CSS Property:background

Description

Css background full height and 100% width on mobile landscape mode

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   w  w  w.  jav  a2 s  . co m-->
   margin : 0;
}
.main-page {
   background: url(https://www.java2s.com/style/demo/InternetExplorer.png) no-repeat center center;
   -webkit-background-size: cover;
   -moz-background-size: cover;
   -o-background-size: cover;
   background-size: cover;
   height : 100vh;
   width : 100%;
}


      </style> 
 </head> 
 <body> 
  <div class="main-page"></div> 
  <div class="conent-page">
    this is a test h this ia  tthasdif asdf asd f a q e c va sdf
  </div>  
 </body>
</html>

Related Tutorials