Use CSS Animation to Change the Hover State of a Button heeeelp

Tell us what’s happening:

hey guys! I thought I did everything right, but as you can I see my code has a few mistakes ( which are unnoticeable for me)

thanks! Much love!

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 background-color{
    100% {
      background-color: #4791d0
    }
  }
  
  
</style>
  
<button>Register</button>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.1 Safari/605.1.15.

You’re missing the semicolon for the background-color line in the keyframes

2 Likes