<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 1.25s ease-in infinite;
}
@keyframes clock {
  20% {transform: scale(1);}
  40% {
    transform: scale(1.4) translateX(-38px) translateY(-38px); 
  }
  60% {transform: scale(1);}
  80% {
    transform: scale (1.4) translateX(-38px) translateY(-38px);
  }
  100% {transform: scale(1);}
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.