LucianoCharles2017

background-responsivo

May 18th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.75 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta charset="UTF-8">
  5.         <title></title>
  6.         <style>
  7.             html, body{
  8.                 height: 100%;
  9.             }
  10.             body {
  11.                 background-image: url('slide4.jpg') ;
  12.                 background-position: center center;
  13.                 background-repeat:  no-repeat;
  14.                 background-attachment: fixed;
  15.                 background-size:  cover;
  16.                 background-color: #999;
  17.  
  18.             }
  19.  
  20.             div, body{
  21.                 margin: 0;
  22.                 padding: 0;
  23.                 font-family: "Lobster", cursive;
  24.  
  25.             }
  26.             .wrapper {
  27.                 height: 100%;
  28.                 width: 100%;
  29.             }
  30.             header{
  31.                 text-align: center;
  32.                 font-size: 2.5em;
  33.                 color: white;
  34.             }
  35.  
  36.             .message {
  37.                 -webkit-box-sizing: border-box;
  38.                 -moz-box-sizing: border-box;
  39.                 box-sizing: border-box;
  40.                 width: 100%;
  41.                 height:45%;
  42.                 bottom: 0;
  43.                 display: block;
  44.                 text-align: center;
  45.                 position: absolute;
  46.                 background-color: rgba(0,0,0,0.6);
  47.                 color: #fff;
  48.                 padding: 0.5em;
  49.             }
  50.             .message h2{
  51.                 font-size: 2em;
  52.             }
  53.             .message p{
  54.                 font-size: 1.8em;
  55.             }
  56.  
  57.  
  58.         </style>
  59.     </head>
  60.     <body>
  61.  
  62.         <div class="wrapper">
  63.  
  64.             <div class="message">
  65.                 <h2>Background Responsivo</h2>
  66.                 <p>Legal nĂ©?</p>
  67.             </div>
  68.         </div>
  69.     </body>
  70. </html>
Advertisement
Add Comment
Please, Sign In to add comment