cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="pageimage img-blur" style="background: url(https://goo.gl/Kx3bdH);background-position: center;background-size: cover;background-attachment: fixed;">
  <h2 class="img-blur-inner">Frosted Glass</h2></div>

<div class="pageimage container">
  <div class="row-fluid">
    <div class="col-sm-12">
      <p>Coding cms templates, often be needed variable background image setting.<br>Set variable URL on HTML template once. And other settings are on CSS.<br>I share the way of css coding for templates.<br>The blur is needed to use with pseudo-class. <br>So with the box inserted background-image, you have to set "background: inherit" on CSS.<br>Adjust the blur box and title box's width,height and padding,it will be responsive.</p>
    </div>
  </div>
</div>
            
          
!
            
              .pageimage {
  height: 500px;
}
.img-blur {
width: 100%;
height: 500px;
padding: 150px 25%;
}
h2.img-blur-inner {
display: block;
position: absolute;
width: 50%;
top:130px;
left: 25%;
height: 200px;
border: solid 1px rgba(255,255,255,.2);
box-shadow: 0px 2px 5px rgba(0,0,0,.6);
-webkit-box-shadow: 0px 2px 5px rgba(#000,.6);
font-size: 40px;
text-align: center;
padding-top: 75px;
text-shadow: 0 1px 5px #000;
color: #fff;
}

.img-blur:before {
    content: "";
    background: inherit;
    position: absolute;
    background-clip: content-box;
    width: 100%;
    height: 500px;
    padding: 150px 25%;
    top: 0px;
    left:0px;
    -webkit-filter: blur(7px);
    filter: blur(7px);
}

p {
  text-align: center;
  margin: 100px 10%;
  line-height: 2;
  font-size: 2em;
}

/* If you want more decoration on glass */
h2.img-blur-inner {
background-image: url(https://goo.gl/tW5GW5),url(https://goo.gl/vN3SK7);
background-repeat: no-repeat,no-repeat;
background-size: contain,contain;
background-position: top left,bottom right;
}

/* for smartphone and so on  */
@media (max-width: 768px) {
.pageimage {
  height: 250px;
}
.img-blur {
width: 100%;
height: 250px;
padding: 75px 10%;
}
h2.img-blur-inner {
display: block;
position: absolute;
width: 80%;
top:55px;
left: 10%;
height: 100px;
font-size: 28px;
text-align: center;
padding: 30px 0px 0px;
}

.img-blur:before {
    content: "";
    background: inherit;
    position: absolute;
    background-clip: content-box;
    width: 100%;
    height: 250px;
    padding: 75px 10%;
    top: 0px;
    left:0px;
    -webkit-filter: blur(7px);
    filter: blur(7px);
} 
}
            
          
!
999px
Loading ..................

Console