-2
have a function jQuery which adds to a div the class below:
.brancoTransparente {
animation: cor;
opacity: .9;
transition: all .3s;
}
.brancoTransparente a {
color: #000;
}
@keyframes cor{
0% {
background-color: transparente;
}
100% {
background-color: #fff;
}
}
the color of the link is changing of good, which leads to believe that the jQuery is entering the class. But the background color is not changing.
What I did wrong?
Obs.: doing as below works. However, the new background appears abruptly and I would like it to appear as an effect fadein:
.brancoTransparente {
opacity: .9;
background: #fff;
}
.brancoTransparente a {
color: #000;
height: 80px;
line-height: 80px;
}
It’s a race on scrool of the browser below 5px color change
got it! But I need that color after changed, don’t change it any more until you get it back to the top 5px of the page. That is, change gradually until reaching 100% of the aimação and after that, have an opacity . 9 and stay throughout the page
– Carlos Rocha
I added information to the question!
– Carlos Rocha