* { margin: 0; padding: 0; box-sizing: border-box; } .loading { display: flex; justify-content: center; align-items: center; min-width: 100vw; min-height: 100vh; background: black; } .loader { position: relative; width: 120px; height: 120px; } .loader span { position: absolute; top: 20px; left: 20px; width: 80px; height: 80px; transform: rotate(calc(30deg * var(--i))); } .loader span::before { content: ''; position: absolute; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: blue; box-shadow: 0 0 10px blue, 0 0 20px blue, 0 0 30px blue, 0 0 40px blue, 0 0 60px blue, 0 0 80px blue, 0 0 100px blue; transform: scale(0); animation: loaderColorTransition 8s linear infinite, loaderBlink 1.2s linear calc(0.1s * (var(--i))) infinite; } @keyframes loaderColorTransition { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } } @keyframes loaderBlink { 0% { transform: scale(1); } 80%, 100% { transform: scale(0); } }