perspective()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2022.
透视函数定义了到 z=0 的坐标轴,使用者能够得到 3D 定位元素的透视,每个 3D 元素在 Z 轴的位置大于零意味着离使用者更近,因此会变得更大,同理当元素 Z 周小于零时会变得 ge
T 更小,变化的幅度决定于属性值的变化大小
语法
css
perspective(d)
参数
Cartesian coordinates on ℝ2 | Homogeneous coordinates on ℝℙ2 | Cartesian coordinates on ℝ3 | Homogeneous coordinates on ℝℙ3 |
---|---|---|---|
这个属性变化提供了一个 3D 空间,并且不会变成平面类型 |
A perspective is not a linear transform in ℝ3 and cannot be represented using a matrix in the Cartesian coordinates system. |
Examples
TBD
规范
Specification |
---|
CSS Transforms Module Level 2 # funcdef-perspective |