Create Movement Using CSS Animation - Incorrect error message

Tell us what’s happening:

// running tests

The @keyframes rule for 50% should use the left offset of 25px.

The @keyframes rule for 100% should use the left offset of -25px.

// tests completed

However, if you look at the code the settings appear correct. What am I doing wrong?

Your code so far

  div {
    height: 40px;
    width: 70%;
    background: black;
    margin: 50px auto;
    border-radius: 5px;
    position: relative;

#rect {
  animation-name: rainbow;
  animation-duration: 4s;

@keyframes rainbow {
  0% {
    background-color: blue;
    top: 0px;
    left: 0px;
  50% {
    background-color: green;   
    top: 25px;
    left: 25px;

  100% {
    background-color: yellow;
    top: -15px;
    left: -25px;

<div id="rect"></div>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36.

Instructions were to NOT replace the top: properties. Set them back to their original settings. At 50% top should be 50px and at 100% top should be 0px

(And will you mark this as the solution please)

1 Like

Thank you. I hate that I miss some instructions! :slight_smile:

It happens to all of us. Glad I was able to help.