blob: b2ba704cf3999bcc31a0ac1c030fc6f7677aee4c (
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
---
title: transform-box
slug: Web/CSS/transform-box
translation_of: Web/CSS/transform-box
---
<div>{{CSSRef}}{{SeeCompatTable}}</div>
<h2 id="概述">概述</h2>
<p><strong><code>transform-box</code></strong>属性定义了与 {{cssxref("transform")}}、{{cssxref("transform-origin")}} 这两个属性有关联的布局框。</p>
<p>{{cssinfo}}</p>
<h2 id="语法">语法</h2>
<pre class="brush: css">/* Keyword values */
transform-box: border-box;
transform-box: fill-box;
transform-box: view-box;
/* Global values */
transform-box: inherit;
transform-box: initial;
transform-box: unset;
</pre>
<p><code>transform-box</code>属性被指定为以下所列出的关键字值之一。</p>
<h3 id="值">值</h3>
<dl>
<dt><code>border-box</code></dt>
<dd>border box是用作引用框,一个表格(table)的border-box是table包装盒的边框,而不是表的边框。</dd>
<dt><code>fill-box</code></dt>
<dd>Uses the object bounding box as reference box.</dd>
<dt><code>view-box</code></dt>
<dd>Uses the nearest {{Glossary("SVG")}} viewport as reference box. If a {{SVGAttr("viewBox")}} attribute is specified for the SVG viewport creating element, the reference box is positioned at the origin of the coordinate system established by the <code>viewBox</code> attribute and the dimension of the reference box is set to the width and height values of the <code>viewBox</code> attribute.</dd>
</dl>
<h3 id="Formal_syntax">Formal syntax</h3>
{{csssyntax}}
<h2 id="Specifications">Specifications</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('CSS3 Transforms', '#transform-box', 'transform-box')}}</td>
<td>{{Spec2('CSS3 Transforms')}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable }}</p>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Chrome</th>
<th>Firefox (Gecko)</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
</tr>
<tr>
<td>Basic support</td>
<td>{{CompatNo()}}</td>
<td>{{CompatGeckoDesktop("41.0")}}<sup>[1]</sup></td>
<td>{{CompatNo()}}</td>
<td>{{CompatNo()}}</td>
<td>{{CompatUnknown()}}</td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Android</th>
<th>Chrome for Android</th>
<th>Firefox Mobile (Gecko)</th>
<th>IE Mobile</th>
<th>Opera Mobile</th>
<th>Safari Mobile</th>
</tr>
<tr>
<td>Basic support</td>
<td>{{CompatUnknown()}}</td>
<td>{{CompatUnknown()}}</td>
<td>{{CompatGeckoDesktop("41.0")}}<sup>[1]</sup></td>
<td>{{CompatUnknown()}}</td>
<td>{{CompatUnknown()}}</td>
<td>{{CompatUnknown()}}</td>
</tr>
</tbody>
</table>
</div>
<p>[1] This property is implemented in Gecko 43.0 {{geckoRelease("43")}} behind the preference <code>svg.transform-box.enabled</code>, defaulting to <code>false</code>. Initially it was implemented in Gecko 41.0 {{geckoRelease("41")}} with the preference named <code>svg.transform-origin.enabled</code>. See {{bug("923193")}} and {{bug("1208550")}}.</p>
<h2 id="See_also">See also</h2>
<ul>
<li><a href="/en-US/docs/CSS/Using_CSS_transforms" title="/en-US/docs/CSS/Using_CSS_transforms">Using CSS Transforms</a></li>
</ul>
|