Евг*_*вич 4 javascript css jsx reactjs material-ui
我想在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>
Run Code Online (Sandbox Code Playgroud)
小智 5
将以下几行代码添加到表的 CSS 中:
{
border-spacing: 0 5px !important;
border-collapse: separate !important;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6038 次 |
| 最近记录: |