I want to make it so when somebody hovers over a button, some glow fades in. I tried that with this code:
.discord_join_button:hover{
color: rgba(255, 255, 255, 1);
box-shadow: 0 0px 60px #2332d8;
animation-duration: 500ms;
}
for some reason this isn’t working and the box-shadow just pops into existence
I was expecting it to fade, not just show up
2
Answers
Use rgba.
And transition should be applied before hover.
I don’t know if it’s what you want, but if you write the box-shadow value in reverse, it’s also possible to make it work in reverse.
you can achieve the "fade in" effect by specifying the
transition
property to thebutton
base style. For example:If you want to know more about the
transition
property: here.