Edit in JSFiddle

<!DOCTYPE html>
<html>
  <head>
    <title>네모 굴리기 - jQuery 사용한 버전</title>
    <meta charset="utf-8" />
    <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
  </head>
  <body>
    <script>
      $("body").append("<div class='square'></div>");
      var style = {
        "width": "100px",
        "height": "100px",
        "border": "1px solid red"
      };
      $(".square").css(style);
      setTimeout(function() {
        var moveStyle = {
          "margin-left": "400px",
          "transition": "4s",
          "transform": "rotate(360deg)"
        };
        $(".square").css(moveStyle);
      }, 2000);
    </script>
  </body>
</html>