React Bootstrap-粘性位置不起作用

问题描述 投票:0回答:1

我正在使用React Bootstrap,而类[[position-sticky根本不起作用。没有所有级别的溢出。有任何提示吗?

css reactjs react-bootstrap sticky
1个回答
0
投票
我发现

Container需要height specified。

向父级添加

高度:100%可以解决此问题。

原因是

sticky

规则使用父级的高度来计算自己的位置。我希望这对其他人也有帮助:)
© www.soinside.com 2019 - 2024. All rights reserved.