A simple CSS trick for colour-changing sticky elements in Webflow
I’ve been playing around with mix-blend-mode: difference, and it is a really nice way to create a colour-changing effect without needing complex animation.
The basic idea:
When an element has:
mix-blend-mode: difference;
it reacts visually to whatever is behind it.
So if you have a sticky element, fixed element, cursor, badge, text, icon, or nav item scrolling over different background sections, the colours can automatically invert or shift as it passes over them.
This works especially well with:
position: sticky;
because the element stays in place while the page content moves behind it.
In Webflow, the cleanest way to add this is through the Custom Properties section in the Style panel.
Add:
mix-blend-mode: difference;
You can it at the end of the video.
Small detail, but it can create a really polished interaction with almost no setup.