I would like to do the following: given the container with the perspective and the inner element with the value translateZ, I would like to “pull up” it with translateY to visually touch the top of the surrounding container: http://jsfiddle.net/8R4ym/129/
Is there any formula that, given the perspective value of the container, the width and height of the element and its Z-translation, I can get for such an "upper" calculation? I play with this, but I can’t find some rules for it, as it seems that these are all variables.
Thanks for any help.
source
share