From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/css/flex_value/index.html | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 files/zh-cn/web/css/flex_value/index.html (limited to 'files/zh-cn/web/css/flex_value/index.html') diff --git a/files/zh-cn/web/css/flex_value/index.html b/files/zh-cn/web/css/flex_value/index.html new file mode 100644 index 0000000000..9aedc6c3e1 --- /dev/null +++ b/files/zh-cn/web/css/flex_value/index.html @@ -0,0 +1,56 @@ +--- +title: +slug: Web/CSS/flex_value +tags: + - CSS + - CSS数据类型 + - Web + - 参考 + - 布局 + - 需浏览器兼容 +translation_of: Web/CSS/flex_value +--- +
{{CSSRef}}
+ +

<flex> CSS 数据类型 表示了网格(grid)容器中的一段可变长度。于{{cssxref("grid-template-columns")}}、{{cssxref("grid-template-rows")}}及相关属性中使用。

+ +

语法

+ +

<flex>数据类型为一{{cssxref("<number>")}}后加单位fr。与所有CSS尺寸相同,单位与数字间无空格。

+ +

Examples

+ +
1fr    /* 使用整型 */
+2.5fr  /* 使用浮点 */
+
+ +

规范

+ + + + + + + + + + + + + + + + +
规范状态注释
{{SpecName("CSS Grid", "#typedef-flex", "<flex>")}}{{Spec2("CSS Grid")}}初步定义
+ +

浏览器兼容性

+ + + +

{{Compat("css.types.flex")}}

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf