<!--<h2>Keyframe Timing Function</h2>-->
<div class="container">
  <div class="ani--dot"></div>
</div>
* {
  margin: 0;
  padding: 0;
  position: relative;
}

html, body {
  height: 100%;
}

h2 {
  position: absolute;
  top: 20%;
  left: 40%;
  font-family: "Arial", sans-serif;
}

.container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  border: 5px solid #3fa9f5;
  width: 500px;
  height: 500px;
  border-radius: 10px;
}

.ani--dot {
  position: absolute;
  background-color: #3fa9f5;
  transform-origin: bottom center;
  margin-left: 120px;
  margin-top: 80px;
  border-radius: 70px;
  height: 70px;
  width: 70px;
  /*transform: translate(310px,-80px);*/
  animation: corner 5s infinite;
}

@keyframes corner {
  0% {
     transform: translate(-120px,-80px);
    animation-timing-function: cubic-bezier(1,.01,.91,.46);
  }
  25% {
     transform: translate(-120px,350px);
  }
  50% {
      transform: translate(310px,350px);
    animation-timing-function: cubic-bezier(0,.02,0,1.01);
  }
  75% {
      transform: translate(310px,-80px);
  }
  100% {
      transform: translate(-120px,-80px);
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.