【发布时间】:2019-12-13 16:48:43
【问题描述】:
我目前正致力于显示用户个人资料的详细信息。我正在尝试使用下面列出的信息设置卡片。我希望这些物品并排放置,而不是在下图中分开它们。
我试过给每个项目一个网格项目,但它只是把它们都列在下面。我想让skills 和home phone 并排坐在同一排
与can also work 和cell phone 并排坐
<Grid container spacing={32} justify="center">
<Grid item>
<PersonImage
personId={metadata.id}
height={175}
width={175}
/>
</Grid>
<Grid item style={{ flexGrow: 1 }}>
<Grid
container
spacing={0}
direction="column"
justify="center"
alignItems="stretch">
<Grid item xs={6}>
<Card>
<InfoLabel
label="Skills"
text={profile.skills}
/>
<InfoLabel
label="Can Also Work"
text={profile.work}
/>
<Grid
container
spacing={16}
justify="center">
<Grid item>
<InfoLabel
label="Home Phone"
text={
contactInfo.homePhone
}
/>
<InfoLabel
label="Cell Phone"
text={
contactInfo.mobilePhone
}
/>
<InfoLabel
label="Email"
text={contactInfo.email}
/>
</Grid>
</Grid>
</Card>
【问题讨论】:
标签: css flexbox material-ui