Created
December 30, 2013 17:22
-
-
Save xMartin/8185040 to your computer and use it in GitHub Desktop.
Simple test case demonstrating an IE issue where opacity is not inherited
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
<!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