CSS
网格布局 | Grid Layout

flex value

flex value

<flex>网格容器,其被声明为与单元尺寸内的柔性长度fr。

实例

1fr /* Using an integer value */ 2.5fr /* Using a float value */

规范

SpecificationStatusComment
CSS Grid LayoutThe definition of '<flex>' in that specification.Candidate RecommendationInitial definition

浏览器兼容性

FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic supportNo support120 (12.10240)No support210.0No support1Nightly build

FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic supportNo supportNo support210.0No supportNo support