Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save socialblogsite/c6474b2750084ee38a11 to your computer and use it in GitHub Desktop.
Save socialblogsite/c6474b2750084ee38a11 to your computer and use it in GitHub Desktop.
A Pen by socialblogsite.
<div id="row_jumbo">
<div class="jumbo" style="background-image: url(http://uspave.com/paving-content/parking-lot-asphalt-photos/2014/04/the-future-of-paving.jpg)">
<h2>Hover the text.</h2>
</div>
</div>

Lens Blur frosted animated IMAGE layer/shadow

Not just a blend of a blurry image on top of the sharp one. Say goodbye to the noticeable mix of hard edges of the back image with a ghost of the blurred version on top. Pure CSS, animated. Almos making love to Bootstrap.

A Pen by socialblogsite on CodePen.

License.

#row_jumbo {
/* border-top: solid 3px #c00; */
padding-top: 0;
position: relative;
background-color: rgba(0,0,0,.5);
font-family: sans-serif;
}
#row_jumbo:before {
content:"";
display:block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 3;
/* background-color: rgba(0,0,0,0); */
transition: box-shadow 1s;
box-shadow: inset 0 20px 70px rgba(255, 194, 0, 0.31), inset 0 5px 10px rgba(255, 255, 255, 0.22);
}
.jumbo h2:before, .jumbo h2:after {
background-image: -webkit-linear-gradient(90deg,rgba(0,0,0,0.50) 0%,rgba(0,0,0,0.50) 100%), url(http://uspave.com/paving-content/parking-lot-asphalt-photos/2014/04/the-future-of-paving.jpg);
background-image: linear-gradient(0deg,rgba(0,0,0,0.50) 0%,rgba(0,0,0,0.50) 100%), url(http://uspave.com/paving-content/parking-lot-asphalt-photos/2014/04/the-future-of-paving.jpg);
}
#row_jumbo:hover:before {
box-shadow: inset 0 0px 0px rgba(255, 194, 0, 0), inset 0 0px 0px rgba(255, 255, 255, 0);
}
body.page-id-21 #header_wrapper {
height: auto;
}
div.jumbo {
font-size: 3em;
max-width: 1200px;
margin: 0 auto;
line-height:normal;
position: relative;
/* min-height: 300px; */
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-direction: normal;
-moz-box-direction: normal;
-webkit-box-orient: horizontal;
-moz-box-orient: horizontal;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
-webkit-box-pack: center;
-moz-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-align-content: center;
-ms-flex-line-pack: center;
align-content: center;
-webkit-box-align: center;
-moz-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
/* background-image defined in the landing-page template */
background-position: center;
background-repeat: no-repeat;
height: 300px;
/* border-top: solid 3px #c00; */
}
div.jumbo:before {
content:"";
display:block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,.5);
-webkit-transition: background-color 0.5s;
-moz-transition: background-color 0.5s;
-o-transition: background-color 0.5s;
-ms-transition: background-color 0.5s;
transition: background-color 0.5s;
/* box-shadow: inset 0 20px 70px rgba(255, 194, 0, 0.31), inset 0 5px 10px rgba(255, 255, 255, 0.22); */
z-index: 1;
}
#row_jumbo:hover .jumbo:before {
background-color: rgba(0,0,0,0);
-webkit-transition: background-color 1s ease-in;
-moz-transition: background-color 1s ease-in;
-o-transition: background-color 1s ease-in;
-ms-transition: background-color 1s ease-in;
transition: background-color 1s ease-in;
}
div.jumbo:after {
content:"";
display:block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url(_img/sun.png);
background-position: -198px -30px;
background-repeat: no-repeat;
}
.jumbo h2 {
padding: 55px;
color: #FFF;
font-size: 1em;
position: relative;
-webkit-box-ordinal-group: 1;
-moz-box-ordinal-group: 1;
-webkit-order: 0;
-ms-flex-order: 0;
order: 0;
-webkit-box-flex: 0;
-moz-box-flex: 0;
-webkit-flex: 0 1 auto;
-ms-flex: 0 1 auto;
flex: 0 1 auto;
-webkit-align-self: auto;
-ms-flex-item-align: auto;
align-self: auto;
margin: auto;
/* display: inline; */
height: auto;
line-height: normal;
z-index: 2;
opacity: 1;
-webkit-transition: opacity 1s ease-in;
-moz-transition: opacit 1s ease-in;
-o-transition: opacity 1s ease-in;
-ms-transition: opacity 1s ease-in;
transition: opacity 1s ease-in;
text-shadow: 0 0 5px #000, 0 0 7px #000;
text-align: center;
max-width: 760px;
}
.page-id-21 #row_jumbo h2 {
width: 16.5em;}
#row_jumbo:hover h2 {
opacity: 0;
-webkit-transition: opacity 0.5s;
-moz-transition: opacit 0.5s;
-o-transition: opacity 0.5s;
-ms-transition: opacity 0.5s;
transition: opacity 0.5s;
}
.jumbo h2:before,
.jumbo h2:after {
/* background-color: rgba(0, 0, 0, 0.5); */
position: absolute;
display: block;
content: "";
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
-webkit-filter: blur(2px);
-moz-filter: blur(2px);
-o-filter: blur(2px);
-ms-filter: blur(2px);
filter: blur(2px);
/* background-image defined AND overlay in the landing-page template */
background-position: center;
background-repeat: no-repeat;
z-index: -3;
}
.jumbo h2:after {
top: 15px;
left: 10px;
right: 10px;
bottom: 10px;
-webkit-filter: blur(15px);
-moz-filter: blur(15px);
-o-filter: blur(15px);
-ms-filter: blur(15px);
filter: blur(15px);
z-index: -2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment