<div class="container">
  <div class="spin-icon">
    <i class="fa-solid fa-spinner"></i>
  </div>
</div>
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spin-icon {
  animation: spin 1s linear infinite;
}

.container {
  text-align: center;
  height: 100%;
  width: 100%;
}
Run Pen

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.