Created
February 24, 2024 05:21
-
-
Save busseyl/7d73cebf389b71b67a81143b33151dd8 to your computer and use it in GitHub Desktop.
Simple spinner in pure CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Pure CSS Spinner</title> | |
<style> | |
body, html { | |
height: 100%; | |
margin: 0; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
.spinner { | |
width: 50px; | |
height: 50px; | |
border: 5px solid rgba(0, 0, 255, 0.2); /* Light blue border */ | |
border-top-color: #007bff; /* Blue color */ | |
border-radius: 50%; | |
animation: spin 1s linear infinite; | |
} | |
@keyframes spin { | |
to { | |
transform: rotate(360deg); | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div class="spinner" style="display: ;"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment