Html and Css horizontal offset

Tell us what’s happening:

Your code so far


<style>
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: -25px;
left: -25px;
  }
}
</style>

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

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 7.0; TECNO WX3 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36.

Challenge: Create Movement Using CSS Animation

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/applied-visual-design/create-movement-using-css-animation

Hello, mercy.

Do you have a question? If so, please edit your post to include the Tell use what’s happening.