Skip to content

Commit

Permalink
zh-CN: update translation Glossary/Flex_Container (#20525)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Ren <[email protected]>
  • Loading branch information
PassionPenguin and jasonren0403 authored Jun 4, 2024
1 parent 3ab1ee4 commit f756902
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions files/zh-cn/glossary/flex_container/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
title: 弹性容器
slug: Glossary/Flex_Container
l10n:
sourceCommit: d267a8cb862c20277f81bbc223221b36b0c613e6
---

{{GlossarySidebar}}

在父元素的 `display` 属性上使用 `flex``inline-flex` 值可定义{{glossary("flexbox", "弹性盒")}}布局。此元素由此变为**弹性容器**(flex container),其任意子元素变为{{glossary("flex item", "弹性元素")}}(flex item)
在父元素的 `display` 属性上使用 `flex``inline-flex` 值可定义{{glossary("flexbox", "弹性盒")}}布局。此元素由此变为**弹性容器**(flex container),其任意子元素变为{{glossary("flex item", "弹性项目")}}。

`flex` 值导致元素变为块级弹性容器,而 `inline-flex` 为行级弹性容器。这些值为元素创建了与区块格式化上下文相似的**弹性格式化上下文**(flex formatting context),浮动体将不会侵入容器,且容器的外边距将不会与元素的外边距发生折叠
`flex` 值会使元素变为块级弹性容器,而 `inline-flex` 值则会使元素变为行内级弹性容器。这些值为元素创建了一个**弹性格式化上下文**,类似于块格式化上下文,其中浮动元素不会侵入容器,容器的边距也不会与项目的边距重叠

## 参见

Expand All @@ -23,6 +25,7 @@ slug: Glossary/Flex_Container

### 拓展阅读

- CSS 弹性盒指南:_[弹性盒的基本概念](/zh-CN/docs/Web/CSS/CSS_flexible_box_layout/Basic_concepts_of_flexbox)_
- CSS 弹性盒指南:_[在弹性容器中对齐元素](/zh-CN/docs/Web/CSS/CSS_flexible_box_layout/Aligning_items_in_a_flex_container)_
- CSS 弹性盒指南:_[掌握弹性元素的折行](/zh-CN/docs/Web/CSS/CSS_flexible_box_layout/Mastering_wrapping_of_flex_items)_
- CSS 弹性盒指南:_[flex 布局的基本概念](/zh-CN/docs/Web/CSS/CSS_flexible_box_layout/Basic_concepts_of_flexbox)_
- CSS 弹性盒指南:_[对齐弹性容器中的弹性项目](/zh-CN/docs/Web/CSS/CSS_flexible_box_layout/Aligning_items_in_a_flex_container)_
- CSS 弹性盒指南:_[掌握弹性项目的包装](/zh-CN/docs/Web/CSS/CSS_flexible_box_layout/Mastering_wrapping_of_flex_items)_
- Firefox 开发者工具 > 如何:_[CSS 弹性盒检查器:检查弹性盒布局](https://firefox-source-docs.mozilla.org/devtools-user/page_inspector/how_to/examine_flexbox_layouts/index.html)_

0 comments on commit f756902

Please sign in to comment.