A Pen by cesardanielhg on CodePen.
Created
September 29, 2013 05:24
-
-
Save cesardanielhg/6749618 to your computer and use it in GitHub Desktop.
A Pen by cesardanielhg.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="box"> | |
<div class="pusher"></div> | |
<div class="box-small"> | |
<div class="content">Breaking Bad.</div> | |
<div class="background blurry"></div> | |
<div class="background translucent"></div> | |
</div> | |
</div> | |
<p>The height of '.pusher' can be adjusted and the translucent/blurry background still works.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "compass"; | |
body { | |
font-family: Helvetica, Arial; | |
padding: 0; | |
margin: 0; | |
color: #222; | |
} | |
.pusher { | |
height: 100px; | |
} | |
.box { | |
display: block; | |
width: 460px; | |
height: 276px; | |
background-image: url(http://static.guim.co.uk/sys-images/Guardian/Pix/pixies/2012/8/30/1346345106154/Breaking-Bad-008.jpg); | |
} | |
.box-small { | |
text-align: center; | |
border-radius: 5px; | |
display: block; | |
padding: 20px 0; | |
width: 80%; | |
margin: 0 auto; | |
position: relative; | |
font-size: 20px; | |
font-weight: bold; | |
} | |
.background { | |
border-radius: 4px; | |
height: 100%; | |
width: 100%; | |
position: absolute; | |
top: 0; | |
} | |
.content { | |
position: relative; | |
z-index: 1; | |
} | |
.translucent { | |
background-color: rgba(255,255,255,0.5); | |
border:4px solid #fff; | |
box-shadow: 0 0 10px #000; | |
} | |
.blurry { | |
background-attachment: fixed; | |
background-image: url(http://static.guim.co.uk/sys-images/Guardian/Pix/pixies/2012/8/30/1346345106154/Breaking-Bad-008.jpg); | |
-webkit-filter: blur(10px); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment