【发布时间】:2020-12-02 06:25:57
【问题描述】:
<div className={'bg-blue-700 flex flex-row p-5 items-center justify-between'} >
<div>
<IconButton className={'bg-blue-900 p-5 hover:bg-blue-900 '}>
<Phone className={'text-white'} />
</IconButton>
<div className="text-white">John Doe</div>
</div>
<div>
</div>
</div>
John Doe 的问题将转到下一行。
这是我想要实现的外观。
提前谢谢你。
【问题讨论】:
-
将 flex 添加到以
iconButton为子元素的 div 中,即代码中的第二个 div。 -
奇怪的工作,但我没有在顶部得到它我说我的所有成员都应该在父母中灵活。我有什么要说的孩子再次弯曲
-
如果你让一个元素伸缩,只有你的子元素可以使用伸缩属性,而不是所有的后代。
标签: css reactjs flexbox tailwind-css