Skip to main content

Grid 网格布局容器

使用场景#

示例#

基本示例#

inline

预设响应式#

inline

自动响应式#

inline

间距#

inline

不同列宽#

inline

自定义用法#

inline

布局偏移#

inline

API#

Grid#

字段描述
columnsResponsiveType
列数
spacingStringOrNumber
间距
spacingXStringOrNumber
水平方向间距
spacingYStringOrNumber
垂直方向间距
minChildWidthStringOrNumber
子元素最小宽度
templateColumnsGridTemplateColumns<0 | (string & {})>
定义每一列的宽度
templateRowsGridTemplateRows<0 | (string & {})>
定义每一行的高度
templateAreaGridTemplateAreas
areaGridArea
asany
styleCSSProperties
classNamestring
mStringOrNumber
marginStringOrNumber
mtStringOrNumber
marginTopStringOrNumber
mrStringOrNumber
marginRightStringOrNumber
mbStringOrNumber
marginBottomStringOrNumber
mlStringOrNumber
marginLeftStringOrNumber
mxStringOrNumber
marginXStringOrNumber
myStringOrNumber
marginYStringOrNumber
pStringOrNumber
paddingStringOrNumber
ptStringOrNumber
paddingTopStringOrNumber
prStringOrNumber
paddingRightStringOrNumber
pbStringOrNumber
paddingBottomStringOrNumber
plStringOrNumber
paddingLeftStringOrNumber
pxStringOrNumber
paddingXStringOrNumber
pyStringOrNumber
paddingYStringOrNumber
colorColor
bgColor
backgroundColorColor
opacityOpacity
widthStringOrNumber
minWidthStringOrNumber
maxWidthStringOrNumber
heightStringOrNumber
minHeightStringOrNumber
maxHeightStringOrNumber
sizeStringOrNumber
displayDisplay
verticalAlignVerticalAlign<0 | (string & {})>
overflowOverflow
overflowXOverflowX
overflowYOverflowY
fontFamilyFontFamily
fontStyleFontStyle
letterSpacingLetterSpacing<0 | (string & {})>
textAlignTextAlign
fontSizestring
fontWeightFontWeight
lineHeightStringOrNumber
alignItemsAlignItems
alignContentAlignContent
justifyItemsJustifyItems
justifyContentJustifyContent
flexWrapFlexWrap
flexDirectionFlexDirection
flexFlex<Length>
flexGrowFlexGrow
flexShrinkFlexShrink
flexBasisFlexBasis<Length>
justifySelfJustifySelf
alignSelfAlignSelf
orderOrder
gridGapGridGap<Length>
gridRowGapGridRowGap<Length>
gridColumnGapGridColumnGap<Length>
gridColumnGridColumn
gridColumnStartGridColumnStart
gridColumnEndGridColumnEnd
gridRowGridRow
gridRowStartGridRowStart
gridRowEndGridRowEnd
gridAreaGridArea
gridTemplateRowsGridTemplateRows<0 | (string & {})>
gridTemplateColumnsGridTemplateColumns<0 | (string & {})>
gridTemplateAreasGridTemplateAreas
borderstring
borderTopstring
borderRightstring
borderBottomstring
borderLeftstring
borderWidthStringOrNumber
borderColorColor
borderTopColorColor
borderRightColorColor
borderBottomColorColor
borderLeftColorColor
borderRadiusstring
positionPosition
zIndexZIndex
topstring
rightstring
bottomstring
leftstring
boxShadowBoxShadow
textShadowTextShadow

GridItem#

字段描述
colSpanStringOrNumber
colStartGridColumnStart
colEndGridColumnEnd
rowSpanStringOrNumber
rowStartGridRowEnd
rowEndGridRowEnd
asany
styleCSSProperties
classNamestring
mStringOrNumber
marginStringOrNumber
mtStringOrNumber
marginTopStringOrNumber
mrStringOrNumber
marginRightStringOrNumber
mbStringOrNumber
marginBottomStringOrNumber
mlStringOrNumber
marginLeftStringOrNumber
mxStringOrNumber
marginXStringOrNumber
myStringOrNumber
marginYStringOrNumber
pStringOrNumber
paddingStringOrNumber
ptStringOrNumber
paddingTopStringOrNumber
prStringOrNumber
paddingRightStringOrNumber
pbStringOrNumber
paddingBottomStringOrNumber
plStringOrNumber
paddingLeftStringOrNumber
pxStringOrNumber
paddingXStringOrNumber
pyStringOrNumber
paddingYStringOrNumber
colorColor
bgColor
backgroundColorColor
opacityOpacity
widthStringOrNumber
minWidthStringOrNumber
maxWidthStringOrNumber
heightStringOrNumber
minHeightStringOrNumber
maxHeightStringOrNumber
sizeStringOrNumber
displayDisplay
verticalAlignVerticalAlign<0 | (string & {})>
overflowOverflow
overflowXOverflowX
overflowYOverflowY
fontFamilyFontFamily
fontStyleFontStyle
letterSpacingLetterSpacing<0 | (string & {})>
textAlignTextAlign
fontSizestring
fontWeightFontWeight
lineHeightStringOrNumber
alignItemsAlignItems
alignContentAlignContent
justifyItemsJustifyItems
justifyContentJustifyContent
flexWrapFlexWrap
flexDirectionFlexDirection
flexFlex<Length>
flexGrowFlexGrow
flexShrinkFlexShrink
flexBasisFlexBasis<Length>
justifySelfJustifySelf
alignSelfAlignSelf
orderOrder
gridGapGridGap<Length>
gridRowGapGridRowGap<Length>
gridColumnGapGridColumnGap<Length>
gridColumnGridColumn
gridColumnStartGridColumnStart
gridColumnEndGridColumnEnd
gridRowGridRow
gridRowStartGridRowStart
gridRowEndGridRowEnd
gridAreaGridArea
gridTemplateRowsGridTemplateRows<0 | (string & {})>
gridTemplateColumnsGridTemplateColumns<0 | (string & {})>
gridTemplateAreasGridTemplateAreas
borderstring
borderTopstring
borderRightstring
borderBottomstring
borderLeftstring
borderWidthStringOrNumber
borderColorColor
borderTopColorColor
borderRightColorColor
borderBottomColorColor
borderLeftColorColor
borderRadiusstring
positionPosition
zIndexZIndex
topstring
rightstring
bottomstring
leftstring
boxShadowBoxShadow
textShadowTextShadow
Copyright © 2021 Alibaba Inc.
Built with ❤️ by hema-FE.