20 comments

  • baliex8 hours ago
    That sounds interesting but it would be a whole lot more interesting if the page was itself an example of said effect!
    • sourcecodeplz2 hours ago
      I&#x27;ve put together an example here but it doesn&#x27;t seem to work in Firefox 151.0.2 (64-bit): <a href="https:&#x2F;&#x2F;favs.eu.org&#x2F;parallax&#x2F;" rel="nofollow">https:&#x2F;&#x2F;favs.eu.org&#x2F;parallax&#x2F;</a><p>Edit: if the body has class=&quot;no-sda&quot;, it uses a js fallback.
    • jonahx4 hours ago
      Or even linked to one!
    • dsmurrell6 hours ago
      I was also looking for examples.
    • yashD186 hours ago
      i was waiting for the effect to show up
  • mpeg8 hours ago
    How does this compare to the classic css-native parallax effect? Before the scroll timeline APIs you&#x27;d use the &quot;perspective&quot; css property to create a container where the z plane is n pixels away from the screen, and then position each layer within it at a different z distance using transform: translateZ<p>That method is GPU accelerated too, so it is performant compared to some js solutions, and has worked well in every browser for around a decade<p>I like the idea of the scroll-timeline though, just keen to understand what the advantage is for this
    • dandep6 hours ago
      OP here, thanks for asking. While the `perspective` technique works too, it has the downside of needing a careful combination of scroller elements and properties.<p>This approach adds a single class to the image container and that&#x27;s it. Plus you can control many aspects of the animation such as entry&#x2F;exit ranges, and make it control other properties like opacity or color, for example.<p>I know browser support is still lacking, but it will get there eventually. I&#x27;m not using this in production code yet, but I think it&#x27;s useful to experiment with these new CSS APIs.
    • semolino3 hours ago
      This method should still support GPU acceleration, as `transform` (or rotate&#x2F;scale&#x2F;etc.) is the only property being animated. The benefit of animation-timeline seems to be that it&#x27;s much easier to set up than a CSS perspective context.
    • som7 hours ago
      No doubt quite a few folk with the same question. Keen to understand performance tradeoffs.<p>Obvious comparison note would be that the &quot;new&quot; method currently enjoys somewhat limited browser support (no Firefox without a flag, and only since Safari 26)
    • iainmerrick7 hours ago
      I was wondering the same thing. That translateZ is a bit fiddly to get right, so I could believe this is a bit easier to use, maybe? And presumably this could be used for other properties besides position, like colors, opacity or blurs.
  • phelm8 hours ago
    A demo <a href="https:&#x2F;&#x2F;codepen.io&#x2F;editor&#x2F;phelm&#x2F;pen&#x2F;019e87f5-dfec-7372-9849-be4d0d8586f0" rel="nofollow">https:&#x2F;&#x2F;codepen.io&#x2F;editor&#x2F;phelm&#x2F;pen&#x2F;019e87f5-dfec-7372-9849-...</a>
    • frereubu8 hours ago
      There&#x27;s me scrolling up and down and thinking &quot;hey, it&#x27;s not working!&quot; But it&#x27;s behind a flag on Firefox: <a href="https:&#x2F;&#x2F;caniuse.com&#x2F;?search=view-timeline-name" rel="nofollow">https:&#x2F;&#x2F;caniuse.com&#x2F;?search=view-timeline-name</a>
      • frereubu5 hours ago
        For people saying it&#x27;s not working in any browser - do you have some kind of reduced motion preference setting turned on? I can imagine that would have an effect on something like this and it&#x27;s definitely working in Chrome for me.
        • cj5 hours ago
          Yes... there&#x27;s a media query in the codepen disabling animation for people with reduced motion enabled.
      • wnevets6 hours ago
        Doesnt work on any browser for me
      • werdnapk7 hours ago
        It&#x27;s been behind a flag for ages. Maybe because of performance issues?
        • goodmythical3 hours ago
          Enabling (layout.css.scroll-driven-animations.enabled) and refreshing the codepen gives a &quot;we crashed this to prevent a crash from an infinite loop&quot; clicking to allow the infinite loops allowed me to see the animation.<p>Fedora 44 Kernel: x86_64 Linux 7.0.10-201.fc44.x86_64 Firefox 151.0.2
      • anssip7 hours ago
        Noticed the same thing. In Mac Safari it works without setting any flags.
      • WithinReason7 hours ago
        tried 4 browsers, didn&#x27;t work in any of them
        • alpinisme7 hours ago
          FWIW it works on iPhone safari
          • deckar013 hours ago
            But it jumps around and flickers pretty bad. Chrome’s own demos in the docs don’t work at all.<p><a href="https:&#x2F;&#x2F;developer.chrome.com&#x2F;docs&#x2F;css-ui&#x2F;scroll-driven-animations" rel="nofollow">https:&#x2F;&#x2F;developer.chrome.com&#x2F;docs&#x2F;css-ui&#x2F;scroll-driven-anima...</a><p>Edit: Their reference works and has some really nice demos. Must be an iframe problem. <a href="https:&#x2F;&#x2F;scroll-driven-animations.style&#x2F;#demos" rel="nofollow">https:&#x2F;&#x2F;scroll-driven-animations.style&#x2F;#demos</a>
          • layer85 hours ago
            Only on iOS 26.
          • abejfehr6 hours ago
            I don’t think it did for me. Are you on iOS 26?
    • Mashimo7 hours ago
      Only worked for me on mobile (vivaldi android) not on vivaldi &#x2F; chrome &#x2F; edge on Desktop.
    • account427 hours ago
      What an age where we need a pile of javascript as well as a bot check to demo a simple CSS trick.
      • zamadatix7 hours ago
        The JS and bot check are for making additional functionality, beyond just showing the example, work easily. I.e. editing and sharing edits from a browser. If all you want is a static example, feel free to make it without these things.
  • sheept3 hours ago
    A parallax effect has also long been possible with CSS 3D transforms. Here&#x27;s a demo,[0][1] from the same person who made that CSS 3D FPS a while ago.[2]<p>[0]: <a href="https:&#x2F;&#x2F;www.keithclark.co.uk&#x2F;articles&#x2F;pure-css-parallax-websites&#x2F;demo3-webkit-overflow-fix&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.keithclark.co.uk&#x2F;articles&#x2F;pure-css-parallax-webs...</a><p>[1]: blog: <a href="https:&#x2F;&#x2F;www.keithclark.co.uk&#x2F;articles&#x2F;pure-css-parallax-websites&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.keithclark.co.uk&#x2F;articles&#x2F;pure-css-parallax-webs...</a><p>[2]: <a href="https:&#x2F;&#x2F;www.keithclark.co.uk&#x2F;labs&#x2F;css-fps&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.keithclark.co.uk&#x2F;labs&#x2F;css-fps&#x2F;</a>
  • thomasikzelf7 hours ago
    You can make some really cool stuff with css scroll animations. I used SVG paths with a scroll animated dash offset to draw an image while scrolling. Zero javascript, it feels so smooth. <a href="https:&#x2F;&#x2F;thomaswelter.nl" rel="nofollow">https:&#x2F;&#x2F;thomaswelter.nl</a> (the background)
    • apsurd2 hours ago
      oh that&#x27;s cool!<p>Can only see it on chrome though =&#x2F;. I switched to Safari as the lesser of two data-harvesting evils. Or rather, with an iPhone I&#x27;ve already chosen my overlord. I also switched to Kagi. Trying to deGoogle myself.
    • rsyring6 hours ago
      Android Firefox: there is no background image.
      • thomasikzelf6 hours ago
        firefox android does not support CSS animation-timeline, and firefox desktop needs layout.css.scroll-driven-animations.enabled. This probably should not be used for any critical features.
  • Semaphor4 hours ago
    This [0] seems to be the main meta bug, with [1] being for CSS and [2] for JS, for FF to ship it without the flag. There seems to be slow work towards it, kinda funny that FF was the first browser to have it (flag-gated, according to CIU) and now is the only one without it in stable ;)<p>[0]: <a href="https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1676779" rel="nofollow">https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1676779</a><p>[1]: <a href="https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1676780" rel="nofollow">https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1676780</a><p>[2]: <a href="https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1676781" rel="nofollow">https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1676781</a>
  • mrcsmcln5 hours ago
    I played around with this API some time ago. It’s simple and high-performance, but one feature I wish existed is damping. Scroll-driven animations are tied directly to the scroll timeline, so there’s no concept of the parallax object “catching up” to the scroll progress over, say, one second. From what I remember, `animation-timing-function` feels weird when you scroll, so it’s not the right solution. GSAP offers this, but it’s JS-only.
  • sillyboi7 hours ago
    It would be awesome to put an interactive example right in the article.
  • Onplana3 hours ago
    I was expecting a demo on the linked page itself. Interesting to let Codex or Claude Code do it :)
  • geuis3 hours ago
    Using css perspective for parallax has been around for years and is much simpler code.
  • thecaio3 hours ago
    there is a special place in hell for pages like these that don&#x27;t show examples
  • tantalor4 hours ago
    Hey, where&#x27;s the demo?
  • rohitsriram7 hours ago
    Love the one-variable design where scale and translate stay in sync automatically, just wish Firefox would get off the flag already.
  • duskdozer7 hours ago
    In a world where it&#x27;s increasingly overlooked, I&#x27;m glad the author mentions disabling it respecting user settings. I do think it should be reversed and only enabled with the `@media (prefers-reduced-motion: no-preference)`, but that is the opinion of someone who gets negative value from animations and is bemused by how much dev and compute time is spent on them.
  • i_am_a_peasant6 hours ago
    Idk about anyone here but I find the effect disorienting.
    • amon_spek6 hours ago
      Yes. I&#x27;m a little more sensitive than average, but not enough to turn off animations, and this is uncomfortable.
  • albert_e5 hours ago
    could this be combined with a sprite like image that shows a slightly different angle of the image with each step
  • hit8run2 hours ago
    I get motion sickness from this specific effect. Especially on high refresh rate screens.
  • Theodores5 hours ago
    Great. I tried the Google examples a while ago and got nowhere with it, time for another go, within the netherworld of SVG, to map to several different layers.
  • xuzhenpeng7 hours ago
    [flagged]
  • swordlucky6664 hours ago
    [dead]