.wrap {
  position: relative;
  block-size: 8rem;
  background: #f4f4f0;
  color: black;
}

.ball {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  inline-size: 1.2rem;
  block-size: 1.2rem;
  border-radius: 50%;
  background: #1d3557;
  offset: path("M 20 110 C 70 20, 190 20, 240 110") 0% auto / center;
  animation: go 3s linear infinite alternate;
}

@keyframes go {
  to {
    offset-distance: 100%;
  }
}