Skip to content

Instantly share code, notes, and snippets.

@xMartin
Created December 30, 2013 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xMartin/8185040 to your computer and use it in GitHub Desktop.
Save xMartin/8185040 to your computer and use it in GitHub Desktop.
Simple test case demonstrating an IE issue where opacity is not inherited
<!doctype html>
<head>
<style>
#outer {
background: red;
height: 5em;
transition: opacity 1s;
/* position: relative; /* fixes opacity issue below */
}
#inner {
margin-top: 1em;
height: 2em;
width: 100%;
background: green;
position: absolute;
opacity: inherit; /* fix IE (including version 11) */
/* transition is not inherited in IE (including version 11) */
}
#outer:hover {
opacity: .2;
}
</style>
</head>
<div id="outer">
<div id="inner"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment