Animation Property not working :(

why my code not working in animation ? Where is the problem? I am pasting my codes below

  img{
height: 50px;
position: relative;
left: 300px;
animation-name: ohm;
  }
@keyframe ohm{
  0%{transform: scale(0.5);
      background-color: blue;}
      50%{transform: scale(3);
           background-color: red;}
           100%{ transform: rotate(20deg);
                  background-color: green;}
}

Post it through the challenge. More information needed with the Challenge Link!

You’ve typo in @keyframes (missing s) and you’re missing animation-duration
https://codepen.io/jenovs/pen/rEGvqQ

2 Likes

Thank you very much :slight_smile:

Why the background color of the image not changing ?

Why the background of the image not changing ? :thinking:

It is changing, you just can’t see it because it’s covered by the image linked in your <img> html element. If you remove that link and give your img a width in CSS, you’ll see it change.

If you actually wanted it to change the background of your linked image, that’s not possible to do in CSS as far as I know.

1 Like