Calculate the edge coordinates of the dom element after transform the dom element using css rotateX, rotateY, perspective

Viewed 40

I use rotateX, rotateY, perspective to achieve the effect of transform elements.

I use getBoundingClientRect() to get the top, left, bottom, right, width, height of the element.

How to calculate the four vertices coordinate of the (dom element) after the image is transform.

sorry my enlish is bad

video demo:https://i.imgur.com/YYArUMz.mp4

image demo:

calculate image coordinate

0 Answers
Related