-1

I set a hover transition for my button but as you can see when the mouse gets out of the button there is no animation like before what should I do to get transition for it? thanks a lot.

#button{
background-color: #F69680;
border: 2px solid   #2e2263;
text-align: center;
text-transform: uppercase;
text-decoration: none;
outline: none;
margin-top: 20px;
padding: 10px 20px;
color:  #2e2263;
}

#button:hover{
    transition: 0.25s;
    background-color:  #2e2263 ;
    color:  #F69680;
    padding: 15px 30px;
}
Temani Afif
  • 245,468
  • 26
  • 309
  • 415

1 Answers1

0

I'm sure there is a better solution but you can set a transition on the #button, so if the button is not hovered anymore the #button is executed/drawn.

TsgabiXD
  • 140
  • 10