反应组件:如何确保组件在其他下方

发布于 2025-02-04 23:11:54 字数 353 浏览 2 评论 0原文

目前,我与孩子的组成部分看起来像这样: “ 我的组件的代码:

const container = styled.div`
  display: flex;
  position: sticky;
  bottom: 40px;
  left: 40px;
  width: max-content;
`

我想这样的底部添加组件: “

我该怎么做?

Currently, my component with children looks like this:
1
My component's code:

const container = styled.div`
  display: flex;
  position: sticky;
  bottom: 40px;
  left: 40px;
  width: max-content;
`

I want to add components to the bottom of it like this:
2

How do I do so?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乖乖 2025-02-11 23:11:54

最好的方法是使用display:Grid在您的CSS中,然后设置网格 - 拼写 - 列表grid-column as需要

The best way to do this is by using display: grid in your CSS and then setting your grid-template-columns and grid-column as needed

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文