<!DOCTYPE html>
<html>

<head>
</head>

<body>

  <div class="animated-element"></div>

</body>

</html>
div {
  background-color: red;
  width: 100px;
  height: 100px;
  position: relative;
}

.animated-element {
  animation: moving 2s infinite;
}

@keyframes moving {
  from { left: 0px; }
  to { left: 250px; }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.