gpt4 book ai didi

html - 在 matrix3d 中使用视口(viewport)单位

转载 作者:太空宇宙 更新时间:2023-11-03 17:40:27 24 4
gpt4 key购买 nike

有没有办法在 matrix3d 中使用视口(viewport)单位?

matrix3d[1 0 0 0
0 1 0 0
0 0 1 0
x y z 1]/*i want x and y in viewport units not px*/

即:translate3d(80vw,90vh,1px)

最佳答案

根据mozilla文档,只有FF支持

Coordinates for 3D graphics Functions defining transformations matrix()

The matrix() CSS function specifies an homogeneous 2D transformation matrix comprised of the specified six values. The constant values of such matrices are implied and not passed as parameters; the other parameters are described in the column-major order.

matrix(a, b, c, d, tx, ty) is a shorthand for matrix3d(a, b, 0, 0, c, d, 0, 0, 0, 0, 1, 0, tx, ty, 0, 1).

Note: Gecko (Firefox) accepts a value for tx and ty. Webkit (Safari, Chrome) and Opera currently support a unitless for tx and ty.

MDN transforms page

关于html - 在 matrix3d 中使用视口(viewport)单位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29191822/

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