Skip to content

Instantly share code, notes, and snippets.

@desandro
Created January 17, 2012 17:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desandro/1627510 to your computer and use it in GitHub Desktop.
Save desandro/1627510 to your computer and use it in GitHub Desktop.
Chrome 3D transform translateZ bug
/**
* 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;
}
<p>Blue <code>&lt;a&gt;</code> tag should be hoverable &amp; clickable.<p>
<div id="env">
<div id="slider">
<div id="content">
<a href="#">Hover & click me</a>
</div>
</div>
</div>
{"view":"split-vertical","prefixfree":"","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment