I'm using parallax.js for a project. I put some layers for mouse driven movement. Now, on a specific layer I'm trying to make some rotationY and X.
From the moment I set the rotation the stacking order of the absolute elements breaks (as you can see in the image).
After googling for hours and after searching here I saw that many users suggest to put transform: translate3d(0px, 0px, 0px); transform-style: preserve-3d; backface-visibility: hidden;
on parent or on each element and by experimenting. Am I missing something?
I know that the preserve-3d
do the job (respect the z order) but no in my case. I reproduced the issue in that codepen. (move your mouse there) As you can see the elements are bad rendered as in the image and overlapping each other. How can I force the browser to respect the Z order?
It works if I set on #scene
transform-style: flat
, but it messes the 3d sense.
Also the parallax.js auto inserts inline style for preserving 3d and backface visibillity on each elements as you can see on the source (2nd image)