V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
nothing2
V2EX  ›  问与答

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

  •  
  •   nothing2 · Dec 15, 2023 · 1070 views
    This topic created in 873 days ago, the information mentioned may be changed or developed.
    title1 向上滚动到 header 位置就停住,保持显示,content1 继续向上。title2 到 header 位置也停住,替换 title1 。下翻同理

    ![5863ab32bd4b00b6c6212c79f1ae8ec1.png]( https://i.miji.bid/2023/12/15/5863ab32bd4b00b6c6212c79f1ae8ec1.png)
    consensus
        1
    consensus  
       Dec 15, 2023
    这不就是 css sticky 吗 ?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1068 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 18:22 · PVG 02:22 · LAX 11:22 · JFK 14:22
    ♥ Do have faith in what you're doing.