网格中的手风琴将内容推迟
我在下面的Codesandbox中有一条手风琴网格。问题是当我打开一项手风琴时,它将下面的所有手风琴推向下面的所有手风琴,而所需的行为只是将其下方的手风琴及其下排的其他手风琴推向同一位置。在以下代码中需要更改什么才能获得此效果?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我在下面的Codesandbox中有一条手风琴网格。问题是当我打开一项手风琴时,它将下面的所有手风琴推向下面的所有手风琴,而所需的行为只是将其下方的手风琴及其下排的其他手风琴推向同一位置。在以下代码中需要更改什么才能获得此效果?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
您可以利用
网格
组件的功能来获得所需的行为。网格中的嵌套网格是魔术酱:要使用材料
grid
组件进行此操作,布局将需要如此:href =“ https://codesandbox.io/s/column-indeppent-accordions-accordions-wtv2xi?file=/demo.tsx” rel =“ nofollow noreferrer”>示例(i vorked your sand box)
“ https://i.sstatic.net/cuhzw.png” rel =“ nofollow noreferrer”>
You can utilize the power of the
Grid
component to get your desired behavior. Nesting grids within grids is the magic sauce:To do this with the material
Grid
component, the layout will need to be as such:EXAMPLE (I forked your sandbox)