<div id="ball"></div>
<select id="group" value="1">
  <option value="linear">linear</option>
  <option value="ease">ease</option>
  <option value="ease-in">ease-in</option>
  <option value="ease-out">ease-out</option>
  <option value="ease-in-out">ease-in-out</option>
</select>
@keyframes move {
  from {
    left: 0px;
  }

  to {
    left: 1000px;
  }
}
#ball {
  position: absolute;
  height: 100px;
  width: 100px;
  border-radius: 50%;
  background-color: orange;
  animation-name: move;
  animation-duration: 6s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

#group {
  position: absolute;
  top: 120px;
}
const ball = document.getElementById("ball");
const group = document.getElementById("group");
group.addEventListener("change", (event) => {
  ball.style.animationTimingFunction = event.target.value;
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.