更改列表网格Ant.Design的方向

时间:2019-03-27 23:08:06

标签: antd

是否可以更改Ant.Design的列表网格?它从左到右填充项目。我希望项目先从上到下滚动,然后再从左到右滚动。我该怎么办?

1 个答案:

答案 0 :(得分:1)

这是网格布局的常见问题。唯一的解决方案是使用css技巧(列数)

<Row style={{ minHeight: "800px",lineHeight:"0",columnCount:"2" }}>
{
  Object.keys(GalleryImages).map(imageKey => {
    return (
      <Col span={24}>
        <img src={GalleryImages[imageKey]} alt={imageKey} height="100%" width="100%" />
      </Col>
    )
  })
}
</Row>

我希望这会有所帮助。