Last active
March 7, 2026 01:42
-
-
Save remarkablemark/76f4e7fb1e1c9414aa0e7ad9a454b8b4 to your computer and use it in GitHub Desktop.
Loading spinner using HTML + 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
| <div id="spinner" role="progressbar" aria-label="Loading"></div> | |
| <style> | |
| #spinner { | |
| position: fixed; | |
| top: 50%; | |
| left: 50%; | |
| width: 100px; | |
| height: 100px; | |
| border: 4px solid #ddd; | |
| border-top: 4px solid #3498db; | |
| border-radius: 50%; | |
| animation: spin 1s linear infinite; | |
| } | |
| @keyframes spin { | |
| 0% { | |
| transform: translate(-50%, -50%) rotate(0deg); | |
| } | |
| 100% { | |
| transform: translate(-50%, -50%) rotate(360deg); | |
| } | |
| } | |
| </style> |
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
| <div id="spinner" role="progressbar" aria-label="Loading"></div> | |
| <style> | |
| #spinner { | |
| width: 50px; | |
| height: 50px; | |
| border: 4px solid #ddd; | |
| border-top: 4px solid #3498db; | |
| border-radius: 50%; | |
| animation: spin 1s linear infinite; | |
| } | |
| @keyframes spin { | |
| 0% { | |
| transform: rotate(0deg); | |
| } | |
| 100% { | |
| transform: rotate(360deg); | |
| } | |
| } | |
| </style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment