CSS3如何计算比例后的高度和宽度 [英] CSS3 how to calculate height and width after scale

查看:592
本文介绍了CSS3如何计算比例后的高度和宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何jQuery解决方案可以找到 -webkit-transform的精确显示高度:scale(0.7851);

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

scale 值可能会有所不同,这就是为什么寻找合适的解决方案

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 ;)

推荐答案

使用 getBoundingClientRect()

element.getBoundingClientRect().height

参见 DEMO

这篇关于CSS3如何计算比例后的高度和宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆