gos*_*amp 3 css reactjs material-ui
我正在使用Grid
Material UI。我不知道为什么网格项目内的图像向左对齐而不是向中心对齐。
<Grid container direction="row" justify="center" alignItems="center">
<Grid item xs={6}>
<Grid container direction="row" justify="center" alignItems="center" alignContent="center" style={{minHeight:"200px"}} >
<Grid item xs={12}>
<Typography style={{color:'white', textAlign:'center', fontSize:'2rem'}}>{name}</Typography>
</Grid>
<Grid item xs={6}>
<a href={github} target="_blank">
<img src={githubIcon} width="32px" height="32px" color="white"/>
</a>
</Grid>
</Grid>
</Grid>
</Grid>
Run Code Online (Sandbox Code Playgroud)
同样在版式中,我必须使用它textAlign
来居中,但如何对齐图像?
归档时间: |
|
查看次数: |
12179 次 |
最近记录: |