Jump to content

Fade transition of logo change in the nav bar

Recommended Posts

Hey,

I've implemented the following code to change the header logo (located in the nav bar), when you scroll down the page.

/* Change logo on scroll */

.shrink .header-title-logo img {
visibility: hidden;
transition: all 0s;
}
.shrink .header-title-logo a {
background-image: url(LINK);
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
transition: all 2s;
}

/* Change logo on scroll */

However, I want the two logo versions to fade into each other, so it's not a sudden transition. 

Also, the nav bar judders/expands ever so slightly, when you initially scroll. Is there a way to fix that?

Any help is much appreciated!

password: chartica

Thanks

Link to comment
  • Replies 1
  • Views 226
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.