.container {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ball {
  width: 100px;
  height: 100px;
  background-color: red;
  border-radius: 50%;
  position: relative;
  animation: bounce 2s ease-in-out infinite, colorChange 4s linear infinite;
}

@keyframes bounce {
  0% {
    top: 0;
  }
  50% {
    top: 300px;
  }
  100% {
    top: 0;
  }
}

@keyframes colorChange {
  0% {
    background-color: red;
  }
  20% {
    background-color: orange;
  }
  40% {
    background-color: yellow;
  }
  60% {
    background-color: green;
  }
  80% {
    background-color: blue;
  }
  100% {
    background-color: purple;
  }
}

  