Created
March 19, 2015 12:25
-
-
Save malachi358/37d1614773e95dd76585 to your computer and use it in GitHub Desktop.
CSS Tranparent Image Background
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 { | |
width: 200px; | |
height: 200px; | |
display: block; | |
position: relative; | |
} | |
div::after { | |
content: ""; | |
background: url(image.jpg); | |
opacity: 0.5; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
position: absolute; | |
z-index: -1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment