Skip to content

Instantly share code, notes, and snippets.

@JonathanDn
Created November 15, 2019 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonathanDn/97fd13da47f01a4d7195e8d9bc30239d to your computer and use it in GitHub Desktop.
Save JonathanDn/97fd13da47f01a4d7195e8d9bc30239d to your computer and use it in GitHub Desktop.
body {
background: cyan;
}
@keyframes donut-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.donut-container {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.donut {
position: absolute;
display: inline-block;
border: 7px solid rgba(0, 0, 0, 0.1);
border-left-color: #fff;
border-radius: 50%;
width: 50px;
height: 50px;
animation: donut-spin 1.2s linear infinite;
}
<div class="donut-container">
<div class="donut"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment