在Material UI的CardHeader组件中,子表头内容之间添加空格可以通过以下步骤实现:
<CardHeader
title={
<Typography variant="h6">
子表头1
</Typography>
}
subheader={
<Typography variant="body2">
子表头2
</Typography>
}
/>
<CardHeader
title={
<Typography variant="h6">
子表头1 子表头2
</Typography>
}
/>
或者
<CardHeader
title={
<Typography variant="h6">
子表头1     子表头2
</Typography>
}
/>
style
属性来添加自定义样式。例如:<CardHeader
title={
<Typography variant="h6" style={{ marginRight: '20px' }}>
子表头1
</Typography>
}
subheader={
<Typography variant="body2" style={{ marginLeft: '20px' }}>
子表头2
</Typography>
}
/>
这样就可以在Material UI的CardHeader组件中的子表头内容之间添加空格或者自定义的间距了。
领取专属 10元无门槛券
手把手带您无忧上云