Created
August 6, 2015 16:56
-
-
Save javadoug/fbc407754e5691ea0524 to your computer and use it in GitHub Desktop.
create transparent background images in css trick
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
/* from https://css-tricks.com/snippets/css/transparent-background-images/ */ | |
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