Edit in JSFiddle

<!DOCTYPE html>
<html>
  <head>
    <title>네모 굴리기 - jQuery 사용하지 않은 버전</title>
    <meta charset="utf-8" />
    <style>
    </style>
  </head>
  <body>
    <script>
      var node = document.createElement("div");
      node.className = 'square';
      var elements = document.getElementsByTagName("body");
      elements[0].appendChild(node);
      node.style.width = "100px";
      node.style.height = "100px";
      node.style.border = "1px solid red";
      setTimeout(function() {
        node.style.marginLeft = "400px";
        node.style.transition = "4s";
        node.style.transform = "rotate(360deg)";
      }, 2000);
    </script>
  </body>
</html>