Perspective calculation in CSS3

281 Views Asked by At

When you use 'perspective' property in css3, in fact it gives you different element height.

<div style="width:200px; height:200px; -webkit-transform-origin: 50% 100%; -webkit-transform: perspective(400px) rotateX(45deg)"></div>

For div with height 200px,perspective 400px and rotateX 45deg, actual size will be 104px.

How can i calculate angle (45deg) for item, based on actual size (104px)?

0

There are 0 best solutions below