How to get screen position of CSS3-3d transformed elements?

前端 未结 3 1417
小蘑菇
小蘑菇 2020-12-15 08:52

I have a very complicated site built on CSS3 that has html elements 3d-transformed, rotated, flipped, flopped and just generally distorted.

I\'m trying to figure out

3条回答
  •  粉色の甜心
    2020-12-15 09:13

    The problem is, that the CSS3 transformations doesn't actually change the position of the elements in anyway. Of course the browsers "know" that they are repositioned, because it renders them, but this information is not provided back to the DOM/API.

    The only thing I can think of, is to calculate the positions based on the transformations yourself, since these are "simple" matrix transformations.

    Unfortunately Algebra class has been too long ago, that I can't tell you anymore how to do it - only that it is possible.

提交回复
热议问题