antd Grid

import { Row, Col } from 'antd';antd

<Row
    type="flex" //內容佈局(左靠齊,右靠齊,居中)
    justify="start" //左靠齊 (start,center,end,space-between,space-around)
    align = "top" //flex佈局下垂直對齊方式:top(默認),moddle,bottom
    gutter = number/object    //柵格間隔,能夠寫成像素值或支持響應式的對象寫法 { xs: 8, sm: 16, md: 24}
>
     <Col
         span={8}   //每行24列,這裏佔8列
         offset={8}    //向右偏移8列
         push={6}    //向右偏移6列
         pull={2}      //向左偏移2列
         xs={2}       //相似boostrop ,小屏幕佔兩列
         order = 1    //柵格順序,flex 佈局模式下有效
    >col-12 </Col>
</Row>    

1. 佈局

  xs : <576pxflex

  sm  : >= 576 pxspa

  md : >= 768pxcode

  lg : >=992px對象

  xl : >=1200pxblog

  xxl : >=1600pxtoken

相關文章
相關標籤/搜索