style: preserve-3d;
    transform: rotateY(-180deg);
  }

  .hideback {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
  }

  .rotatetofront {
    transform: rotateY(180deg);
  }
</style>

<body>

<div class="container">
  <div class="rotatetoback" >
    <div id="target" class="hideback rotatetofront" style="background: blue">
    </div>
    <div class="hideback" style="background: green;">
    </div>
  </div>
</div>

</body>

<script>

  test(t => {
    const ex