CSS3 how to calculate height and width after scale [duplicate]

为君一笑 提交于 2019-12-23 07:22:48

问题


Is there any jQuery solution that to find exact display height of the -webkit-transform: scale(0.7851);

the scale value may vary that is why looking for proper solution

Tested these options unfortunately didn't find solution yet :(

height()
innerHeight()
outerHeight()
outerHeight(true)

I think this issue only can fix one the basis of mathematics ;)


回答1:


Use getBoundingClientRect().

element.getBoundingClientRect().height

See DEMO.



来源:https://stackoverflow.com/questions/16467220/css3-how-to-calculate-height-and-width-after-scale

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!