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: