Simple Loading Spinner with CSS


Create a loading spinner using only CSS animations.

Source Code

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #555;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments