<div class="star"></div>
@keyframes rotate {
    0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.star {
  animation: 2.5s rotate infinite;
  animation-timing-function: linear;
}




.star {
  margin: 50px auto;
  width: 70px;
  height: 70px;
  background: black;
}
.star:after {
  content: "";
  display: block;
  width: 70px;
  height: 70px;
  background: black;
  transform: rotate(45deg);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.