Javascript 固定页眉和固定侧导航带静态页脚,侧导航带页脚折叠

Javascript 固定页眉和固定侧导航带静态页脚,侧导航带页脚折叠,javascript,jquery,html,css,Javascript,Jquery,Html,Css,页眉的位置是固定的,侧导航应该随着滚动上下移动,所以我为侧导航应用了位置固定,我现在面临的问题是它与页脚一起塌陷 <div class="header" style="background: #555;color: #f1f1f1;position:fixed;" id="myHeader"> <h2>I am header you can change my coding but my position should be fixed</h2> &l

页眉的位置是固定的,侧导航应该随着滚动上下移动,所以我为侧导航应用了位置固定,我现在面临的问题是它与页脚一起塌陷

<div class="header" style="background: #555;color: #f1f1f1;position:fixed;" id="myHeader">
    <h2>I am header you can change my coding but my position should be fixed</h2>
</div>

<div class="content">
    <div style="height:1400px"></div>
    <div style="width: 200px; background-color: #999; position: fixed; right: 20px; top: 200px; height: 383px;">
        <h3>I should move with scroll but should not collapse with footer</h3>
    </div>
    <div style="width: 1800px; background-color: #996; right: 20px; top: 300px; height: 383px;">
        <h2>I am footer</h2>
    </div>

</div>

我是队长,你可以改变我的编码,但我的位置应该是固定的
我应该用卷轴移动,但不应该用页脚折叠
我是页脚

侧导航应该是固定的,还是随滚动移动?我从你的问题中得到的是,你想让它滚动并停在页脚,这是必需的功能吗?要用滚动移动侧导航,我设置位置:固定,然后我想停在页脚。我的项目是angular,在jquery中得到了一些东西并试图实现,但这是一条漫长的道路jquery是一个选项,然后尝试这个如果不抱歉,不知道angular,但是快速谷歌搜索发现了这个,你可以尝试这个并使用它。嗯。。我正在研究Angular2,由于它的不同组成部分,所以页脚的视线为零