<div class="square"/>
.square {
  width: 50px;
  height: 50px;
  background-color: red;
  
  animation: moveRight 2s;
}

@keyframes moveRight {
  0%, 100% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(100px);
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.