Created
May 2, 2021 21:33
-
-
Save ahmu83/5e0accaf3c65f2b76bb7ec8448d1b465 to your computer and use it in GitHub Desktop.
This file contains 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> | |
<head> | |
<title>Simple CSS Loading Icon</title> | |
</head> | |
<style type="text/css" media="screen"> | |
body { | |
margin-top: 150px; | |
text-align: center; | |
} | |
.loading { | |
display: inline-flex; | |
width: 24px; | |
height: 24px; | |
background-color: white; | |
border: 2px solid black; | |
border-radius: 100%; | |
position: relative; | |
justify-content: flex-start; | |
align-items: flex-start; | |
} | |
.loading::before { | |
content: ""; | |
position: absolute; | |
width: 5px; | |
height: 5px; | |
background-color: white; | |
border-radius: 100%; | |
} | |
.loading.animate { | |
animation-name: animateLoading; | |
animation-duration: 0.8s; | |
animation-iteration-count: infinite; | |
animation-direction: normal; | |
animation-timing-function: linear; | |
} | |
@keyframes animateLoading { | |
from { | |
transform: rotate(0deg); | |
} | |
to { | |
transform: rotate(360deg); | |
} | |
} | |
</style> | |
<body> | |
<div class="loading animate"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment