<style>
  * {
    box-sizing: border-box;
  }
  html, body {
    align-items: center;
    background: linear-gradient(45deg, #1f3a93, #f39c12);
    display: flex;
    justify-content: center;
    margin: 0;
    min-height: 100vh;
    padding: 0;
    width: 100vw;
  }
  div > div {
    background: #fff;
    border-radius: 100%;
    height: 50px;
    margin: 40px;
    width: 50px;
  }
</style>
<div class='wrapper'>
  <div></div>
</div>
.wrapper {
  animation: x 2s ease-in-out infinite 1s both;
}

.wrapper > div {
  animation: y 2s ease-in-out infinite 1s both;
}

@keyframes x {
  0% {
    transform: translate(-25vw, 0);
  }
  100% {
    transform: translate(25vw, 0)
  }
}

@keyframes y {
  50% {
    transform: translate(0, -20vh);
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.