【发布时间】:2021-09-10 19:15:23
【问题描述】:
这里我在卡上应用 css 悬停它的工作,但我也想在悬停时更改文本颜色和卡颜色
card: {
maxWidth: 350,
height: 300,
'&:hover': {
backgroundColor: '#373737 !important',
},
},
//这是应用上述css的卡片组件
<Card
className={classes.card}
style={{
margin: 'auto',
backgroundColor: '#F3FEEF',
borderRadius: '16px',
}}
>
<Box my={2} />
<CardActionArea className={classes.MuiCardActionArea}>
<CardContent>
<div className={classes.hovers}>
<Typography
gutterBottom
variant='h5'
direction='row'
color='textPrimary'
align='left'
underline='hover'
>
{aboutTitle}
</Typography>
</div>
</CardContent>
</CardActionArea>
</Card>
【问题讨论】:
标签: css material-ui card