'Calculate the edge coordinates of the dom element after transform the dom element using css rotateX, rotateY, perspective
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:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|