Skip navigation
This kinda sums up better what CSS offset-path gives you 🏎️
0:00 / 0:31

This kinda sums up better what CSS offset-path gives you 🏎️

jhey ʕ•ᴥ•ʔ

@jh3yy147K followers

Visit on X
634 likesDownloadOriginal post

71,684 views

This kinda sums up better what CSS offset-path gives you 🏎️ A responsive way to animate an element along the perimeter of another 🎬 Use the rect() value to control the inset of that path ✨ And the great thing is, it's responsive 🤙

9 Comments

Comments from the original post on X (Twitter)

  • Andy Hawkes's profile picture

    @namboozle

    Going to rename bookmarks to Jheymarks

    5 likes

  • jhey ▲🐻🎈's profile picture

    @jh3yy

    Haha – Saving that one 😅

    1 like

  • Florin Pop 👨🏻‍💻's profile picture

    @florinpop1705

    Could you make the track be an 8 shape? 👀

    2 likes

  • jhey ▲🐻🎈's profile picture

    @jh3yy

    Did one of them already 😉

    14 likes

  • Mandy Michael's profile picture

    @Mandy_Kerr

    What! This is awesome!’!

    1 like

  • Javaid Shah's profile picture

    @JvShah124

    That's cool 😎

  • Daniel Cranney 🇬🇧's profile picture

    @danielcranney

    Amazing as always my man 👏

  • Matt's profile picture

    @uixmat

    Speed/length of animation should really depend on the track too, that’s an issue with “responsive animations” for lack of a better term. I guess we’d just set it with js based on vp size

  • jhey ▲🐻🎈's profile picture

    @jh3yy

    Can jus' use a container query. @​container (width < 300px) { .car { animation-duration: 2s; } } Didn't add this in because wasn't really what the demo was getting at 🤙

    1 like