How to Use CSS Animation to Change the Hover State of a Button?

see my code and find my mistake because can’t submit my code to FreeCodeCamp:

  **Your code so far**

<style>
button {
  border-radius: 5px;
  color: white;
  background-color: #0F5897;
  padding: 5px 10px 8px 10px;
}

button:hover {
  animation-name: background-color
  animation-duration: 500ms;
}

@keyframes bacground-color {
100% {
  background-color: #4791d0; 
}
}
</style>

<button>Register</button>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36

Challenge: Use CSS Animation to Change the Hover State of a Button

Link to the challenge:

[ANSHUL_SONI]

  1. button:hover {
    animation-name: background-color ( You forgot to add ; )
    animation-duration: 500ms;
    }
    2.@keyframes bacground-color (animation name spelled wrong )
    I hope this will help you.

in “keyframes background-color” you forgot the K in background

1 Like

thanks my friend ,we will meet when some problem is coming( ̄︶ ̄)