我对material-ui组件中的段落有疑问。我对material-ui组件中的段落有疑问。特定的问题是,当文本超出组件的尺寸时,它不会保留在其中,如图所示。<Grid container wrap="nowrap" css={[borde,{ maxWidth: 400 }]} > <Grid item xs css={beneficiosTab} > <Typography >asdadsdasdasdasdasdasdasdasdasdasdasdasdadasdsadasdasdasdsadasdasdsads </Typography> </Grid></Grid>我希望屏幕上显示的是容器尺寸内的一段
1 回答
慕的地10843
TA贡献1785条经验 获得超8个赞
尝试一下style={{wordWrap: 'break-word'}},希望对您有所帮助。谢谢
<Grid container wrap="nowrap" css={[borde,{
maxWidth: 400
}]} >
<Grid item xs css={beneficiosTab} >
<Typography style={{wordWrap: 'break-word'}}
>asdadsdasdasdasdasdasdasdasdasdasdasdasdadasdsadasdasdasdsadasdasdsads
</Typography>
</Grid>
</Grid>
添加回答
举报
0/150
提交
取消