--- pageClass: comp-page-class --- # Layout 栅格 ## 概述 span24: 100% span12: 50% span12: 50% span8: 33.3333% span8: 33.3333% span8: 33.3333% span6: 25% span6: 25% span6: 25% span6: 25% offset8 span8 采用了24栅格的概念,相比Bootstrp的12格,它可以实现更精细的布局比例。解决常用的布局问题、对齐问题、宽度自适应等问题。 定义了两个概念,行Row和列Cell,具体使用方法如下: * 使用 Row 在水平方向创建一行 * 将一组 Cell 插入 Row 中 * 在 Cell 写入自己的内容 * 通过设置 Cell 的span来控制 Cell 的宽度 * 通过设置 Cell 的offset来控制 Cell 往右的偏移 ## 代码示例 ## API ### Cell props | 属性 | 说明 | 类型 | 默认值 | |:--------------|:--------------------------|:--------|:-----------------------------------------------------| | span | 栅格的占位格数,可选值为0~24的整数 | String\|Number | null | | offset | 栅格的向右偏移数,可选值为0~24的整数 | String\|Number | null |