Can anyone suggest me how to solve this problem?

Tell us what’s happening:
Requirement:-

  1. The @keyframes rule should use the animation-name background-color.
  2. There should be one rule under @keyframes that changes the background-color to #4791d0 at 100%.

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

@keyframe background-color {
  100%{
    background-color:#4791d0;
  }
}


</style>

<button>Register</button>

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36.

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

Link to the challenge:

Hi!

It’s typo error. It’s not @keyframe.
It’s @keyframes

2 Likes

ohh thanks for reply…

1 Like