<div class="element">
</div>
<div class="element">
</div>
<div class="element">
</div>
.element {
  display: inline-block;
  background-color: #aaaaaa;
  height: 100px;
  width: 100px;
  transform: skew(20deg);
  font-size: 1px;
  padding: 1px;
  color: white;
  margin-right: 5px;
  margin-left: 5px;
  animation: shake 2s infinite;
  animation-direction: alternate;
}

@keyframes shake {
  0% {
    transform: skewY(20deg);
  }
  100% {
    transform: skewY(-20deg);
  }
}

body, html {
  height: 100%;
}


body {
  display: flex;
  align-items: center;
  justify-content: center;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.