Created
January 17, 2012 17:03
-
-
Save desandro/1627510 to your computer and use it in GitHub Desktop.
Chrome 3D transform translateZ bug
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
/** | |
* Chrome 3D transform translateZ bug | |
*/ | |
#env { | |
width: 200px; | |
height: 200px; | |
border: 2px solid; | |
-webkit-perspective: 1000; | |
} | |
#slider { | |
-webkit-transform-style: preserve-3d; | |
-webkit-transform: translateZ( 1001px ); | |
} | |
#content { | |
width: 200px; | |
height: 200px; | |
-webkit-transform: translateZ( -1001px ); | |
} | |
#content a { | |
display: block; | |
height: 100%; | |
background: blue; | |
color: white; | |
font-size: 40px; | |
text-align: center; | |
text-decoration: none; | |
} | |
#content a:hover { | |
background: red; | |
color: yellow; | |
} |
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
<p>Blue <code><a></code> tag should be hoverable & clickable.<p> | |
<div id="env"> | |
<div id="slider"> | |
<div id="content"> | |
<a href="#">Hover & click me</a> | |
</div> | |
</div> | |
</div> | |
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
{"view":"split-vertical","prefixfree":"","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment