Do you need to change the logo for the sticky header? Here is a simple way to achieve this behavior using Greyd.Suite.

DEMO for Changing Logo on a sticky header

Building the Sticky Header

I learned how to build a sticky header from this official tutorial created by Thomas.

Changing the Logo for the Sticky Header

We need 2 different elements to be activated as a logo for each state.

Following the same heading structure, I added another image for the sticky header

For the Site logo element, I added a custom animation, in wich the initial state is display: block, and the final state is display: none;

For the Sticky Image, I added another Custom animation, using the opposite initial / final state:

You Can find the DEMO on this page

Similar Posts