Created
April 14, 2013 16:09
-
-
Save nick-thompson/5383238 to your computer and use it in GitHub Desktop.
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
/** | |
* A cool trick for making a transparent background image | |
* using only pseudo-elements. | |
*/ | |
body:after { | |
content: "", | |
background: url(/path/to/your/sweet/image.png) no-repeat center center fixed; | |
background-size: cover; | |
opacity: 0.1; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
position: fixed; | |
z-index: -1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment