aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/glossary/cross_axis/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/glossary/cross_axis/index.html')
-rw-r--r--files/zh-cn/glossary/cross_axis/index.html72
1 files changed, 72 insertions, 0 deletions
diff --git a/files/zh-cn/glossary/cross_axis/index.html b/files/zh-cn/glossary/cross_axis/index.html
new file mode 100644
index 0000000000..27412c4d85
--- /dev/null
+++ b/files/zh-cn/glossary/cross_axis/index.html
@@ -0,0 +1,72 @@
+---
+title: 交叉轴
+slug: Glossary/交叉轴
+translation_of: Glossary/Cross_Axis
+---
+<p>弹性容器 {{glossary("flexbox")}} 的交叉轴和主轴 {{glossary("main axis")}} 垂直,因此如果弹性方向是 {{cssxref("flex-direction")}} 行 <code>row</code> 或者反向行 <code>row-reverse</code> ,那么交叉轴就是从上至下地垂直走向的。</p>
+
+<p><img alt="The cross axis runs down the column" src="https://mdn.mozillademos.org/files/15710/Basics3.png" style="display: block; height: 125px; margin: 0px auto; width: 666px;"></p>
+
+<p>如果你的主轴是列 <code>column</code> 或者反向列 <code>column-reverse</code> ,那么交叉轴就是水平走向的。</p>
+
+<p><img alt="The cross axis runs along the row." src="https://mdn.mozillademos.org/files/15711/Basics4.png" style="display: block; height: 244px; margin: 0px auto; width: 523px;"></p>
+
+<p>要在交叉轴上对齐,是通过弹性容器的 <code>align-items</code> 属性来控制的,或者通过弹性元素的 <code>align-self</code> 属性来单独决定的对齐方式。在多行弹性容器中,交叉轴上有多余控件的话,你还可以用 <code>align-content</code> 来控制行的间距。</p>
+
+<h2 id="学习更多">学习更多</h2>
+
+<h3 id="属性参考">属性参考</h3>
+
+<div class="index">
+<ul>
+ <li>{{cssxref("align-content")}}</li>
+ <li>{{cssxref("align-items")}}</li>
+ <li>{{cssxref("align-self")}}</li>
+ <li>{{cssxref("flex-wrap")}}</li>
+ <li>{{cssxref("flex-direction")}}</li>
+ <li>{{cssxref("flex")}}</li>
+</ul>
+</div>
+
+<h3 id="拓展阅读">拓展阅读</h3>
+
+<ul>
+ <li>CSS 弹性容器指南:<em><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox">Basic Concepts of Flexbox</a></em></li>
+ <li>CSS 弹性容器指南:<em><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Aligning_Items_in_a_Flex_Container">Aligning items in a flex container</a></em></li>
+ <li>CSS 弹性容器指南:<em><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Mastering_Wrapping_of_Flex_Items">Mastering wrapping of flex items</a></em></li>
+</ul>
+
+<section class="Quick_links" id="Quick_Links">
+<ol>
+ <li><a href="/en-US/docs/Glossary">MDN Web Docs Glossary</a>
+
+ <ol>
+ <li>{{Glossary("Cross Axis")}}</li>
+ <li>{{Glossary("Flex")}}</li>
+ <li>{{Glossary("Flex Container")}}</li>
+ <li>{{Glossary("Flex Item")}}</li>
+ <li>{{Glossary("Grid")}}</li>
+ </ol>
+ </li>
+ <li>相关 CSS 属性
+ <ol>
+ <li>{{cssxref("align-content")}}</li>
+ <li>{{cssxref("align-items")}}</li>
+ <li>{{cssxref("align-self")}}</li>
+ <li>{{cssxref("flex")}}</li>
+ <li>{{cssxref("flex-basis")}}</li>
+ <li>{{cssxref("flex-direction")}}</li>
+ <li>{{cssxref("flex-flow")}}</li>
+ <li>{{cssxref("flex-grow")}}</li>
+ <li>{{cssxref("flex-shrink")}}</li>
+ <li>{{cssxref("flex-wrap")}}</li>
+ <li>{{cssxref("justify-content")}}</li>
+ <li>{{cssxref("order")}}</li>
+ </ol>
+ </li>
+</ol>
+</section>
+
+<div id="gtx-trans" style="position: absolute; left: 78px; top: 1380px;">
+<div class="gtx-trans-icon"></div>
+</div>