V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
nothing2
V2EX  ›  问与答

求教这种网页滚动方式的简单实现

  •  
  •   nothing2 · 138 天前 · 449 次点击
    这是一个创建于 138 天前的主题,其中的信息可能已经有所发展或是发生改变。
    title1 向上滚动到 header 位置就停住,保持显示,content1 继续向上。title2 到 header 位置也停住,替换 title1 。下翻同理

    ![5863ab32bd4b00b6c6212c79f1ae8ec1.png]( https://i.miji.bid/2023/12/15/5863ab32bd4b00b6c6212c79f1ae8ec1.png)
    consensus
        1
    consensus  
       138 天前
    这不就是 css sticky 吗 ?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2483 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:19 · PVG 22:19 · LAX 07:19 · JFK 10:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.