Edit in JSFiddle

<!DOCTYPE html>
<html>
  <head>
    <title>네모 굴리기 - HTML, CSS 사용한 버전</title>
    <meta charset="utf-8" />
    <style>
      .square {
        width: 100px;
        height: 100px;
        border: 1px solid red;
      }
      .square.move {
        margin-left: 400px;
        transition: 4s;
        transform: rotate(360deg)
      }
    </style>
  </head>
  <body>
    <div class="square"></div>
    <script>
      setTimeout(function() {
        document.querySelector(".square").className += ' move';
      }, 2000);
    </script>
  </body>
</html>