WeCode
Academy
Tutorials
Web Development
Bootstrap
CSS
HTML
JavaScript
jQuery
Node.js
PHP
React
TypeScript
Programming
C
C#
C++
Go
Java
Python
Rust
Data and Databases
NumPy
Pandas
SQL
Tools
Bash
Git
Projects
Project: A Tiny Shell in C
Project: Bank Account System
Project: Library Management System
Project: Portfolio Page
Project: Quiz App in React
Project: Sales Data Analysis
Project: Server Log Analyser
Project: To-Do REST API
Project: URL Shortener
Project: Word Counter in Four Languages
All tutorials ❯
Paths
References
Practice
Try it editor
Quizzes
How To recipes
Tools
Glossary
My Learning
🌙
Dark mode
Home
›
How To
›
CSS
Make a loading spinner
Rotate a bordered circle with a keyframe animation.
Example
html
<style> .spinner { width: 40px; height: 40px; border: 5px solid #e7e9eb; border-top-color: #04aa6d; border-radius: 50%; animation: spin 0.9s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } </style> <div class="spinner"></div>
Run ❯
Reset
Open in editor »
More CSS recipes
Center a div horizontally and vertically
Make a sticky header
Create a responsive grid of cards
Style a button with a hover effect
Build a pure CSS tooltip