0

I need to change logo in fixed header while passing different sections.

If you take a look at this site, it changes color while scroll down. I need to have this function in my website. This is the site that I am working on right now.

Built with WordPress divi theme.

Tried new things but none of it is working. Can anyone recommend how to code this function?

I tried to use custom css inside divi module but it is not working.

I have this css code it was used for regular heading to sticking heading.

#logo {
opacity:1;
display:inherit;
margin: 0 0 0 0;
-webkit-transition: all .4s ease-in-out;
-moz-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
}
#logo.second-logo {
opacity:0;
margin: 0 0 -200px -130px;
-webkit-transition: all .4s ease-in-out;
-moz-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
}
.et-fixed-header #logo {
opacity: 0;
margin: -200px 0px 0 0px;
-webkit-transition: all .4s ease-in-out;
-moz-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
 
}
.et-fixed-header #logo.second-logo {
opacity:1;
margin: 0 0 0 -90px !important;
-webkit-transition: all .4s ease-in-out;
-moz-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
}

So, when user scroll down and passing different section this .et-fixed-header #logo .et-fixed-header #logo.second-logo

I want opacity change dynamically while scroll down and pass different section.

bitmon
  • 3
  • 1
  • 4

0 Answers0