I think the problem here is similar to the well-known behavior, in which position: absolute / fixed div, which does not have a specific height / width, can often disappear. In your case, the 3D canvas searches for <div class="div1"> to have a certain width, otherwise it just floats aimlessly in space, because you gave it properties that use a three-dimensional canvas, and I believe that indirectly calls it Do not expand to contain child divs.
In any case, you can see that determining the height and width for the element with preserve-3d fixes the problem in the JS script: http://jsfiddle.net/nY9v6/
Brian
source share