Created
October 30, 2012 17:17
-
-
Save jshaw/3981638 to your computer and use it in GitHub Desktop.
IE8 Transparency / Opacity explination
This file contains 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
/* | |
This is based on the assumption that the .pop-background element is inserted into the DOM at the bottom of the page after initial page load when the modal is initiated on click. | |
*/ | |
.pop-background { | |
/* Works when inserted into the DOM after page load. Data-uri's work as well as hosted images. */ | |
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA9JREFUeNpiYGBgiAEIMAAAYQBdPMcrbwAAAABJRU5ErkJggg==") 0 0 repeat; | |
/* | |
Does not work when inserted after the DOM is initially loaded for the first time. The element will have no opacity filter applied. | |
background: black; | |
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=30); | |
*/ | |
/* | |
This opacity will display correct however all of the hover states behind the modal window such as links | |
navigation hover states will still be activated when the user mouses over them. The modal background .pop-background | |
does not prevent interaction with page elements. | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)"; | |
*/ | |
width: 100%; | |
z-index: 999; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment