有没有办法改变Ant.Design的列表网格?它从左到右填充项目。我希望项目先从上到下滚动,然后从左到右滚动。我该怎么做?
这是网格布局的常见问题。唯一的解决方案是使用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>
我希望这会有所帮助。