<div class="container">
  <section class="section">
    <img src="http://s3-ap-northeast-1.amazonaws.com/nishinoshake/demo/animals/uni.png" class="uni uni-linear" />
  </section>
  <section class="section">
    <img src="http://s3-ap-northeast-1.amazonaws.com/nishinoshake/demo/animals/uni.png" class="uni uni-easing" />
  </section>
</div>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
}
.container {
  width: 100%;
  min-height: 100vh;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
}
.uni {
  width: 70px;
  height: auto;
  display: block;
  animation: rotation 2.2s infinite alternate-reverse;
}
.uni-linear {
  animation-timing-function: linear;
}
.uni-easing {
  animation-timing-function: var(--ease-in-out-cubic);
}
.section + .section {
  margin-top: 60px;
}
.label {
  margin-top: 2em;
  text-align: center;
}

@keyframes rotation {
  0% {
    transform: translateX(-250%) rotate(0deg);
  }
  100% {
    transform: translateX(250%) rotate(720deg);
  }
}
View Compiled

External CSS

  1. https://fonts.googleapis.com/css2?family=Poppins:wght@300&amp;display=swap

External JavaScript

This Pen doesn't use any external JavaScript resources.