Css 是否可以根据子元素展开绝对定位的元素高度?如果是的话,怎么办?
在下面的代码中,当状态更改为“展开”时,内部文本溢出,但网格项不展开Css 是否可以根据子元素展开绝对定位的元素高度?如果是的话,怎么办?,css,reactjs,grid,material-ui,Css,Reactjs,Grid,Material Ui,在下面的代码中,当状态更改为“展开”时,内部文本溢出,但网格项不展开 <Grid item xs={10} container style={{position: 'absolute', left: '40px'}}> <MaterialTypography variant='h5custom' align='left' style={this.state.expanded ? { marginTop: '4px' } : { whiteSpace: 'nowra
<Grid item xs={10} container style={{position: 'absolute', left: '40px'}}>
<MaterialTypography variant='h5custom' align='left' style={this.state.expanded ? { marginTop: '4px' } : { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
{details}
</MaterialTypography>
</Grid>
{详细信息}
您需要在示例中添加materialtyphography
组件。我使用排版
进行了复制,效果很好。您需要在示例中添加materialtyphography
组件。我使用排版技术进行了复制,效果很好。