Skip to content

Instantly share code, notes, and snippets.

@mikedugan
Created November 7, 2013 14:29
Show Gist options
  • Select an option

  • Save mikedugan/7355435 to your computer and use it in GitHub Desktop.

Select an option

Save mikedugan/7355435 to your computer and use it in GitHub Desktop.
transparent background using an image
/*transparent background image
* make sure you change the url and opacity to suit */
.element {
position:relative;
z-index:1;
}
.element:before {
content:"";
position:absolute;
z-index:-0;
top:0;
bottom:0;
left:0;
right:0;
background:url("path-to-image.jpg");
opacity:0.5;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment