<flex>
<flex> CSS 数据类型 表示了网格(grid)容器中的一段可变长度。于 grid-template-columns、grid-template-rows 及相关属性中使用。
语法
<flex> 数据类型为一 <number> 后加单位 fr。与所有 CSS 尺寸相同,单位与数字间无空格。
示例
css
1fr /* 使用整型 */
2.5fr /* 使用浮点 */
规范
| Specification |
|---|
| CSS Grid Layout Module Level 2 # fr-unit |
浏览器兼容性
BCD tables only load in the browser