Image swap on scroll

Hi everyone,

Here is a mini tutorial on how to swap an image on scroll using relative styling: https://www.youtube.com/watch?v=xd5bMR-4KzY

Before following the tutorial, please ensure that your header section has the Scroll Direction set to active.

To achieve the swap you will need two image blocks:

  • The first image block disappears when the user scrolls down and reappears when back at the top
  • The second image appears when the user scrolls down and disappears when back at the top.

Note: don’t forget to set the cc-scrolld-top virtual class to your header section.
This ensures that when the user reaches the top, the first image reappears, and the second one disappears.

Enjoy :hugs:

May I ask you what you expect or have in mind how things should work?
It’s a builder, and yes, clicks are required.

You are always free to use custom code, like any other tool forces you to do.
Cwicly gives you the choice to achieve everything visually. It’s an option, not a must.

1 Like

While this is the cleanest in-built way to swap images, or any other elements based on these related states, I’m sure that things will get a lot easier as soon as we receive a major Interaction update/overhaul.

So, the only thing you can do right now, if you dislike using Relative Styling, is to patiently wait and use custom code.
Cwicly rapidly improves over time.

I suggest you create a Feedback thread to share your thoughts.
Wrong topic here, it might get missed.

Thanks.