gpt4 book ai didi

jquery - 固定 div 在滚动时在未固定的 div 下消失

转载 作者:行者123 更新时间:2023-11-28 11:33:44 26 4
gpt4 key购买 nike

JSFIDDLE here

Fiddle 正常工作,但现在我想改变它的工作方式。目前只有 fixed_header_top 是永久固定的,我希望 fixed_header_middle 也永久固定,但应该逐渐消失 fixed_header_bottombody_block 向下滚动时。

像这个:http://livedemo00.template-help.com/wt_43176/index.html

我需要为此操作更改什么?

我将 position: fixed; 给了 #fixed_header_middlemargin-top: 50px; z-index: 100;#fixed_header_bottom, #fixed_placeholder 但没有用。

谢谢

最佳答案

检查我在 fiddle 上做了什么你所做的是正确的,只是你必须添加

#fixed_header_bottom, #fixed_placeholder {

margin-top: 150px;
position: absolute;

}

Check on fiddle

关于jquery - 固定 div 在滚动时在未固定的 div 下消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21018636/

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