gpt4 book ai didi

javascript - TableRow Material-UI 之间的间距

转载 作者:行者123 更新时间:2023-11-28 01:14:56 24 4
gpt4 key购买 nike

我想在 TableRow MaterialUI 组件之间添加空间。我怎样才能做到这一点?

<S.MainTable>
<TableBody>
{rows.map(row => {
return (
<S.StyledTableRow key={row.id}>
<TableCell component="th" scope="row">{row.name}</TableCell>
<TableCell numeric>{row.calories}</TableCell>
<TableCell numeric>{row.fat}</TableCell>
<TableCell numeric>{row.carbs}</TableCell>
<TableCell numeric>{row.protein}</TableCell>
</S.StyledTableRow>
);
})}
</TableBody>
</S.MainTable>

最佳答案

将这几行代码添加到表格的 CSS 中:

{
border-spacing: 0 5px !important;
border-collapse: separate !important;
}

关于javascript - TableRow Material-UI 之间的间距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51909737/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com