Simple Rotation

In this example below you will see how to do a Simple Rotation with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by richardkalehoff, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright richardkalehoff ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Simple Rotation</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div id="square"><div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/richardkalehoff/simple-rotation-zAjyc */
#square {
  width: 100px;
  height: 100px;
  background: red;
  margin: 2em auto;
  
  transform: rotate(45deg);
}

Comments