CSS Rotation Keyframe animation

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

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

  <meta charset="UTF-8">
  <title>CSS Rotation Keyframe animation</title>
      <link rel="stylesheet" href="css/style.css">






/*Downloaded from https://www.codeseek.co/shekhar/css-rotation-keyframe-animation-AayfK */
div {
  width: 24px;
  height: 24px;
  background: red;
  -webkit-animation-name: rotate360;
  -webkit-animation-duration: 1s;
  -webkit-animation-iteration-count: infinite;
  -webkit-animation-timing-function: ease-out;
  /* -webkit-transform: rotate(-45deg); */

@-webkit-keyframes rotate360 {
  100% {
  -webkit-transform: rotate(-359deg);