这是我的代码
https://stackblitz.com/edit/react-me9rk9
attached screenshot for your reference
return (
<Card className={classes.card} >
<CardContent>
<Grid container justify="space-between">
<Grid item container spacing={0} alignItems="center" justify="left">
<Grid container direction="row" alignItems="flex-start">
<AssessmentOutline color="primary" className={classes.largeIcon} />
<Grid >
<Typography color="textPrimary" gutterBottom variant="h1">20</Typography>
<Typography color="textPrimary" gutterBottom variant="h6">Assessment Due</Typography>
</Grid>
</Grid>
</Grid>
</Grid>
</CardContent>
</Card>
);
答案 0 :(得分:0)
在CSS下方添加
。.MuiCardContent-root:last-child {
padding-bottom : 0 !important;
}
答案 1 :(得分:0)
import { withStyles } from "@material-ui/core";
const styles = (theme) => ({
removeBottomPadding: {
paddingBottom: "0px"
}
});
class YourComponetName extends Component {
render(){
const { classes } = this.props;
return (
<MaterialComponent classes={{ root: classes.removeBottomPadding}}>
// your code
</MaterialComponent >
)
}
}
export default withStyles(styles, { withTheme: true })(YourComponentName)