Skip to content

Instantly share code, notes, and snippets.

@h0st1le
Created March 14, 2012 19:58
Show Gist options
  • Save h0st1le/2039081 to your computer and use it in GitHub Desktop.
Save h0st1le/2039081 to your computer and use it in GitHub Desktop.
background transparency without affecting child elements
.alpha60 {
/* Fallback for web browsers that doesn't support RGBa */
background: rgb(0, 0, 0) transparent;
/* RGBa with 0.6 opacity */
background: rgba(0, 0, 0, 0.6);
/* For IE 5.5 - 7*/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
/* For IE 8*/
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment