Created
June 15, 2012 16:27
-
-
Save jegtnes/2937421 to your computer and use it in GitHub Desktop.
:after hack to apply background-color above background-image without extra markup
This file contains 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
header:after { | |
background-color: rgba(0, 0, 0, 0.3); | |
content: ""; | |
height: 100%; | |
left: 0; | |
position: absolute; | |
top: 0; | |
width: 100%; | |
z-index: -1; | |
} | |
header { | |
background-image: url(foo.png); | |
position: relative; | |
z-index: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment