向下滚动时更改固定的标题徽标

时间:2019-03-26 11:29:26

标签: javascript jquery html css wordpress

我需要在传递不同部分的同时更改固定标题中的徽标。

如果您查看this网站,它会在向下滚动时改变颜色。我需要在我的网站上具有此功能。 This是我目前正在使用的网站。

内置WordPress divi主题。

尝试了新事物,但没有一个起作用。谁能推荐该函数的编码方式?

我试图在divi模块中使用自定义css,但是它不起作用。

我有此CSS代码,用于将常规标题更改为固定标题。

#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;
}

因此,当用户向下滚动并通过不同部分时, .et-fixed-header #logo .et-fixed-header#logo.second-logo

我希望在向下滚动并通过不同部分时动态地更改不透明度。

0 个答案:

没有答案
相关问题