Guest User

Untitled

a guest
Oct 11th, 2014
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.83 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <title>Blurred DIVs</title>
  5.         <style type="text/css">
  6.         .wrap  {
  7.             max-width: 1080px;
  8.             height: auto;
  9.         }
  10.             #bg, #search-bg {
  11.               background-image: url('http://jordanhollinger.com/media/freelancer-desk.jpg');
  12.               background-repeat: no-repeat;
  13.               background-size: 1080px auto;
  14.             }
  15.  
  16.             #bg {
  17.               background-position: center top;
  18.               padding: 70px 90px 120px 90px;
  19.             }
  20.  
  21.             #search-container {
  22.               position: relative;
  23.             }
  24.  
  25.             #search-bg {
  26.               /* Absolutely position it, but stretch it to all four corners, then put it just behind #search's z-index */
  27.               position: absolute;
  28.               top: 0px;
  29.               right: 0px;
  30.               bottom: 0px;
  31.               left: 0px;
  32.               z-index: 99;
  33.  
  34.               /* Pull the background 70px higher to the same place as #bg's */
  35.               background-position: center -70px;
  36.  
  37.               filter: blur(10px);
  38.               -webkit-filter: blur(10px);
  39.               -moz-filter: blur(10px);
  40.               filter: url('/media/blur.svg#blur'); /* for Firefox */
  41.             }
  42.  
  43.             #search {
  44.               /* Put this on top of the blurred layer */
  45.               position: relative;
  46.               z-index: 100;
  47.               padding: 20px;
  48.               background: rgb(34,34,34); /* for IE */
  49.               background: rgba(34,34,34,0.75);
  50.             }
  51.  
  52.             @media (max-width: 600px ) {
  53.               #bg { padding: 10px; }
  54.               #search-bg { background-position: center -10px; }
  55.             }
  56.  
  57.             #search h2, #search h5, #search h5 a { text-align: center; color: #fefefe; font-weight: normal; }
  58.             #search h2 { margin-bottom: 50px }
  59.             #search h5 { margin-top: 70px }
  60.         </style>
  61.     </head>
  62.     <body>
  63.     <div class="wrap">
  64.         <div id="bg">
  65.             <div id="search-container">
  66.                 <div id="search-bg"></div>
  67.                 <div id="search">
  68.                     <h2>Awesome freelancers at the right price</h2>
  69.                      <h5><a href="#">How it works »</a></h5>
  70.                 </div>
  71.             </div>
  72.         </div>
  73.     </div>
  74.     </body>
  75. </html>
Advertisement
Add Comment
Please, Sign In to add comment