• Default - 元素比窗口大的情况

    侧边栏比浏览器窗口高,侧边栏在向下滚动时会附着在页面的底部,在向上滚动时会附着在页面的顶部。

    查看示例

  • Default - 元素比窗口小的情况

    侧边栏比页面的高度小,侧边栏在页面向上或向下滚动时都会附着在页面的顶部。

    查看示例

  • 多个固定元素

    Nice example showing multiple stickies on one page.

    查看示例

  • 元素内部的固定元素

    Use innerSticker option to stick at a certain element. In this example, sticky will stick to the second box inside the sidebar only when you go up. When you go down it sticks to the bottom of the sidebar.

    Launch Demo

  • 不跟随滚动的内部固定元素

    Use innerSticker option to stick at a certain element, and followScroll:false so the sidebar doesn't follow the scroll once attached. In this example, sticky will stick to the second box inside the sidebar when you go down or up.

    查看示例

  • Inner Top not following scroll

    Use innerTop option to stick after a certain distance, and followScroll:false so the sidebar doesn't follow the scroll once attached. In this example, sticky will stick 200px from top inside the sidebar when you go down or up.

    查看示例