<div class="mega-wrapper"> 
  <div class="wrapper">
    <div class="big-cube"></div>
    <div class="small-cube"></div>
  </div>
</div>
.mega-wrapper {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.big-cube {
  border: 8px solid black;
  width: 100px;
  height: 100px;
  margin: 0 auto;
  margin-top: 35%;
  z-index: 0;
}
.small-cube {
  width: 70px;
  height: 70px;
  border: 8px solid black;
  background-color: #f15922;
  z-index: 10;
  margin-top: -42%;
  margin-left: 58%;
  
  animation: clock 2s linear infinite;
}
@keyframes clock {
  20% {transform: translateX(-110px);}
  40% {transform: translateX(-110px) translateY(-110px);}
  60% {transform: translateX(0px) translateY(-110px);}
  80% {transform: translateX(0px) translateY(0px);}
  100% {
    transform: translateX(0px) translateY(0px) rotate(0deg) rotate(-180deg) rotate(-360deg); 
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.