aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/transform-function/perspective/index.html
blob: 56d6762b9e926e6021fa33ecfb867fbbcc67bd62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
title: perspective()
slug: Web/CSS/transform-function/perspective
translation_of: Web/CSS/transform-function/perspective()
original_slug: Web/CSS/transform-function/perspective()
---
<div>{{CSSRef}}</div>

<div>透视函数定义了到z=0的坐标轴,使用者能够得到3D定位元素的透视,每个3D元素在Z轴的位置大于零意味着离使用者更近,因此会变得更大,同理当元素Z周小于零时会变得ge</div>

<p>T更小,变化的幅度决定于属性值的变化大小 </p>

<h2 id="语法">语法</h2>

<pre class="syntaxbox notranslate">perspective(l)
</pre>

<h2 id="参数">参数</h2>

<dl>
 <dt><em>l</em></dt>
 <dd>这个{{cssxref("&lt;length&gt;")}} 得到的是距离0坐标的距离. 被用作提供一个透视渐变属性给某个元素. 如果这个值是0或者不合法的值,将不会产生透视的变化.</dd>
</dl>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Cartesian coordinates on ℝ<sup>2</sup></th>
   <th scope="col">Homogeneous coordinates on ℝℙ<sup>2</sup></th>
   <th scope="col">Cartesian coordinates on ℝ<sup>3</sup></th>
   <th scope="col">Homogeneous coordinates on ℝℙ<sup>3</sup></th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td colspan="2" rowspan="2">
    <p>这个属性变化提供了一个3D空间,并且不会变成平面类型</p>
   </td>
   <td colspan="1" rowspan="2">A perspective is not a linear transform in ℝ<sup>3</sup> and cannot be represented using a matrix in the Cartesian coordinates system.</td>
   <td colspan="1" rowspan="2"><math> <mfenced><mtable><mtr>1<mtd>0</mtd><mtd>0</mtd><mtd>0</mtd></mtr><mtr>0<mtd>1</mtd><mtd>0</mtd><mtd>0</mtd></mtr><mtr><mtd>0</mtd><mtd>0</mtd><mtd>1</mtd><mtd>0</mtd></mtr><mtr><mtd>0</mtd><mtd>0</mtd><mtd><mo></mo>1<mo>/</mo>d</mtd><mtd>1</mtd></mtr></mtable> </mfenced> </math></td>
  </tr>
 </tbody>
</table>

<h2 id="Examples">Examples</h2>

<p>TBD</p>