Per this example: http://jsbin.com/zuyena/4/edit, I've got two elements, one after the other inside a container:
<div class="container">
<div class="box box1">... text ...</div>
<div class="box box2">... text ...</div>
</div>
With the help of CSS transitions/animations, I'd like to animate the box2
to appear as though it's flapping down from underneath of box1
. Omitting the actual transition, I'm pretty close with:
.container {
-webkit-perspective: 300px;
-webkit-perspective-origin: 50% 0%;
}
.box2 {
-webkit-transform-origin: 0 0;
-webkit-transform: rotateX(-80deg);
-webkit-backface-visibility: hidden; /* Doesn't this hide the back face? */
}
However, as you can see in this example, the back face of box2
is visible behind box1
, despite -webkit-backface-visibility: hidden;
. How can I prevent this?
P.S. I am only using -webkit
prefixes to keep the example simple.