gpt4 book ai didi

CSS3//计算一个元素经过matrix3d变换后的 "real pixels"

转载 作者:太空宇宙 更新时间:2023-11-04 12:30:50 25 4
gpt4 key购买 nike

假设我使用 matrix3d 变换放大一个元素,如何获得该元素的最终像素尺寸?

最佳答案

使用

Element.getBoundingClientRect()

https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect

如果你使用 jQuery,那么 $(CSS selector)[0].getBoundingClientRect()

将返回{height:?,width:?,top:?,left:?}对象数据

关于CSS3//计算一个元素经过matrix3d变换后的 "real pixels",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27669207/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com