aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/transform-style/index.html
blob: 592621b43972b6006396f398bd2b0c30bbec8f4a (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
title: transform-style
slug: Web/CSS/transform-style
translation_of: Web/CSS/transform-style
---
<div>{{SeeCompatTable}}</div>

<p><a href="/en-US/docs/Web/CSS">CSS</a> 属性 <strong><code>transform-style </code></strong>设置元素的子元素是位于 3D 空间中还是平面中。</p>

<div>{{EmbedInteractiveExample("pages/css/transform-style.html")}}</div>



<p>如果选择平面,元素的子元素将不会有 3D 的遮挡关系。</p>

<p>由于这个属性不会被继承,因此必须为元素的所有非叶子子元素设置它。</p>

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

<pre class="brush:css no-line-numbers">/* Keyword values */
transform-style: flat;
transform-style: preserve-3d;

/* Global values */
transform-style: inherit;
transform-style: initial;
transform-style: unset;
</pre>

<h3 id="值"></h3>

<dl>
 <dt><code>flat</code></dt>
 <dd>设置元素的子元素位于该元素的平面中。</dd>
 <dt><code>preserve-3d</code></dt>
 <dd><span class="tlid-translation translation" lang="zh-CN"><span title="">指示元素的子元素应位于 3D 空间中。</span></span></dd>
</dl>

<h3 id="正式语法">正式语法</h3>

{{csssyntax}}

<h2 id="规范">规范</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS Transforms 2', '#transform-style-property', 'transform-style')}}</td>
   <td>{{Spec2('CSS Transforms 2')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<p>{{cssinfo}}</p>

<h2 id="浏览器兼容性">浏览器兼容性</h2>



<p>{{Compat("css.properties.transform-style")}}</p>

<h2 id="另见">另见</h2>

<ul>
 <li><a href="/en-US/docs/CSS/Using_CSS_transforms">Using CSS transforms</a></li>
</ul>

<div>{{CSSRef}}</div>