JSFiddle - React, Tailwind, and code Playground

by LordGuard

HTML

<<div id="wrap">
  <div id="box"></div>
</div>
<style>
  #wrap {
    position: absolute;
    contain: strict;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    top: 0;
    left: 0;
    backface-visibility: hidden;
  }

  #box {
    position: absolute;
    width: 40px;
    height: 40px;
    background: black;
    animation: box-animation 2s infinite;
  }

  @keyframes box-animation {
    0% {
      left: 0
    }
    50% {
      left: 200px
    }
    100% {
      left: 0
    }
  }
</style>