gpt4 book ai didi

material-ui - 如何在 LeftNav 中创建粘性页脚?

转载 作者:行者123 更新时间:2023-12-04 21:10:28 24 4
gpt4 key购买 nike

我正在尝试在 <LeftNav> 中创建一个粘性页脚组件,到目前为止没有成功。这是需要的样子:

enter image description here

我试过使用 position: fixed; bottom: 0position: absolute; bottom: 0在搜索字段的包装上,但是当用户滚动列表项时,搜索字段会向上移动。像这样:

enter image description here

知道如何解决这个问题吗?

最佳答案

位置:固定应该工作。如果没有更多关于如何设置页面的信息,就很难更具体。看看这个 fiddle ,看看是否有帮助:

https://jsfiddle.net/kevinlrak/r1mpf1n8/

#search {
position: fixed;
background-color: red;
bottom: 0;
width: 25%;
}

关于material-ui - 如何在 LeftNav 中创建粘性页脚?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35662201/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com