Gezinmeyi atla
soon: CSS only sticky scroll hide/reveal 🧑‍🍳
0:00 / 0:20

soon: CSS only sticky scroll hide/reveal 🧑‍🍳

jhey ʕ•ᴥ•ʔ

@jh3yy147 B takipçi

X profili
553 beğeniİndirOrijinal gönderi

66.423 görüntüleme

soon: CSS only sticky scroll hide/reveal 🧑‍🍳 .atc { position: fixed; bottom: 0; transition: translate 0.26s cubic-bezier(.55,0,.67,1.25); /* hide on scroll down */ @​container scroll-state(scrolled: bottom) { translate: 0 100%; transition-delay: 0.5s; } }

13 Yorum

Yorumlar X (Twitter) üzerindeki orijinal gönderiden alınmıştır

  • Victor Rivas profil fotoğrafı

    @shipwithvictor

    Top top!!

    1 beğeni

  • jhey ʕ•ᴥ•ʔ profil fotoğrafı

    @jh3yy

    @readytorelease it’s at the bottom though 🥁😅

    1 beğeni

  • Jan Nicklas profil fotoğrafı

    @jantimon

    wow - is it also possible to build a scrolled bottom once?

    1 beğeni

  • jhey ʕ•ᴥ•ʔ profil fotoğrafı

    @jh3yy

    like a tuck away and forget after scrolling from the top but towards the bottom? you could do a scroll animation that triggers a translation at a certain point that then wouldn’t trigger again until scrolling back up

    2 beğeni

  • Michaël profil fotoğrafı

    @mic_gallego

    One current limitation is the inability to specify an offset. For instance, in our case we would like to hide a header after scrolling for a given amount. Having a way to define scroll-state(scrolled: bottom by 100px) for instance would be nice! Is this something being planned?

    1 beğeni

  • jhey ʕ•ᴥ•ʔ profil fotoğrafı

    @jh3yy

    yeah, agreed 💯 it kinda feels like you'd want something a bit like scroll-margin/padding-top to have an effect on the scroll-state trigger 🤔

  • Michaël profil fotoğrafı

    @mic_gallego

    Exactly. Using scroll-margin/padding was actually my first intuition, but this did not work!

    1 beğeni

  • ᴋᴏᴠᴀʀ profil fotoğrafı

    @stevenkovar

    Is it fully supported finally?

    1 beğeni

  • Fabrizio Calderan profil fotoğrafı

    @fcalderan

    You may achieve a similar behaviour using custom properties and style queries

    1 beğeni

  • jhey ʕ•ᴥ•ʔ profil fotoğrafı

    @jh3yy

    find this one unreliable unfortunately, it’s easy to get into a state where it doesn’t appear when you want it to

  • gumbo701 profil fotoğrafı

    @gumbo701

    Css is beautiful

  • Human profil fotoğrafı

    @mogzhiza

    Is it possible to have a sticky block hide/reveal as you scroll, rather than through a transition animation?

  • gokhan profil fotoğrafı

    @gkurttech

    Cool. I think it's somewhat possible with scroll/view states already.