Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 是否可以根据子元素展开绝对定位的元素高度?如果是的话,怎么办?_Css_Reactjs_Grid_Material Ui - Fatal编程技术网

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
组件。我使用
排版技术进行了复制,效果很好。