Created
September 7, 2019 04:52
-
-
Save JonathanDn/89e1418d8eb472a6ce9bcdf91e9f206f to your computer and use it in GitHub Desktop.
Futuristic Loader HTML CSS - Fiddle: https://jsfiddle.net/5tL8wes9/1/
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
@keyframes donut-spin { | |
0% { | |
transform: rotate(0deg); | |
} | |
100% { | |
transform: rotate(360deg); | |
} | |
} | |
@keyframes donut-spin-reverse { | |
0% { | |
transform: rotate(360deg); | |
} | |
100% { | |
transform: rotate(0deg); | |
} | |
} | |
@keyframes fade { | |
0% {opacity: 1;} | |
50% {opacity: 0;} | |
100% {opacity: 1;} | |
} | |
.donuts { | |
margin: 0 auto; | |
position: relative; | |
width: 300px; | |
height: 300px; | |
margin-top: 100px; | |
} | |
.donut-container { | |
position: absolute; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
width: 100%; | |
height: 100%; | |
} | |
.donut { | |
position: absolute; | |
display: inline-block; | |
border: 20px solid rgba(0, 0, 0, 0.1); | |
border-left-color: #7983ff; | |
border-right-color: #7983ff; | |
border-radius: 50%; | |
width: 150px; | |
height: 150px; | |
animation: donut-spin 1.2s linear infinite; | |
} | |
.small-donut { | |
position: absolute; | |
display: inline-block; | |
border: 20px solid rgba(0, 0, 0, 0.1); | |
border-left-color: #7983ff; | |
border-right-color: #7983ff; | |
border-radius: 50%; | |
width: 75px; | |
height: 75px; | |
animation: donut-spin-reverse 1.2s linear infinite; | |
} | |
.circle { | |
width: 50px; | |
height: 50px; | |
background: #7983ff; | |
border-radius: 50%; | |
animation: fade 1.2s linear infinite; | |
} |
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 class="donuts"> | |
<div class="donut-container"> | |
<div class="donut"></div> | |
</div> | |
<div class="donut-container"> | |
<div class="small-donut"></div> | |
</div> | |
<div class="donut-container"> | |
<div class="circle"></div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment