JSFiddle - React, Tailwind, and code Playground

HTML

<div class="wrapper">
<div class="animate"></div>
</div>

CSS

.wrapper {
  width: 600px;
  height:50px;
  position: relative;
  background-color: #fff;
  overflow: hidden;
}

.animate  {
  width: 50px;
  height: 50px;
  position: absolute;
  background-color: red;
  //right:-100px;
  animation: wind 2s linear infinite;
}

@keyframes wind {
  0% {right:30%}
  100% {right:120%}
}