aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/flex-flow/index.html
blob: 4ed7ff98e5e37fe69ceb0e29e0462278991ba46b (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
---
title: flex-flow
slug: Web/CSS/flex-flow
translation_of: Web/CSS/flex-flow
---
<div>{{ CSSRef("CSS Flexible Boxes") }}</div>

<h2 id="概述">概述</h2>

<p>
  <a href="/zh-CN/docs/Web/CSS">CSS</a> <strong><code>flex-flow</code></strong> 属性是 flex-direction 和 flex-wrap 的简写。
</p>

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

<p>更多信息参见 <a href="/zh-CN/docs/Web/Guide/CSS/Flexible_boxes">使用 CSS 弹性盒</a></p>

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

<pre class="syntaxbox"><a href="/zh-CN/docs/CSS/Value_definition_syntax" title="/zh-CN/docs/CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("flex-flow")}}</pre>

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

<p><code>更多取值信息请查看</code> <a href="/zh-CN/docs/CSS/flex-direction" title="zh-CN/docs/CSS/flex-direction"><code>flex-direction</code></a><a href="/zh-CN/docs/CSS/flex-wrap" title="flex-wrap"><code>flex-wrap</code></a></p>

<h2 id="示例">示例</h2>

<pre class="brush:css;highlight:3">element {
  /* Main-axis is the block direction with reversed main-start and main-end. Flex items are laid out in multiple lines */
  flex-flow: column-reverse wrap;
}
</pre>

<h2 id="Specifications" name="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><a class="external" href="http://dev.w3.org/csswg/css3-flexbox/#flex-flow">CSS Flexible Box Layout Module</a></td>
   <td>{{ Spec2('CSS3 Flexbox') }}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

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

<p>{{ CompatibilityTable() }}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>特性</th>
   <th>Firefox (Gecko)</th>
   <th>Chrome</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>基础支持</td>
   <td>28.0</td>
   <td>
    <p><span style="font-size: 12px; line-height: 18px;">21.0{{property_prefix("-webkit")}}</span><br>
     <span style="font-size: 12px; line-height: 18px;">29.0</span></p>
   </td>
   <td>11</td>
   <td>12.10</td>
   <td><span style="font-size: 12px; line-height: 18px;">6.1{{ property_prefix("-webkit") }}</span></td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>Android</th>
   <th>IE Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>基础支持</td>
   <td>28.0</td>
   <td>{{ CompatUnknown() }}</td>
   <td>11</td>
   <td>12.10</td>
   <td><span style="font-size: 12px; line-height: 18px;">7.1{{ property_prefix("-webkit") }}</span></td>
  </tr>
 </tbody>
</table>
</div>

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

<ul>
 <li><a href="/zh-CN/docs/CSS/Using_CSS_flexible_boxes" title="/zh-CN/docs/CSS/Using_CSS_flexible_boxes">使用 CSS 弹性盒子</a></li>
</ul>