# demo-02-fixed-sticky fixed 按钮相对视口;sticky 标题在滚动区顶部粘住。 ## 运行 直接打开 `index.html`,滚动内部区域与整个页面。 ## 观察 - fixed 按钮不随页面滚动 - sticky 标题只在滚动区内粘住,离开容器就恢复 - sticky 需要 `top` 阈值,否则不生效