-
-
Save zoltan-nz/b82f3371b1c736831c50 to your computer and use it in GitHub Desktop.
Spinner
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
.spinner { | |
margin: auto; | |
height: 20px; | |
width: 20px; | |
-webkit-animation: spin 1.5s linear infinite; | |
-moz-animation: spin 1.5s linear infinite; | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
z-index: 999; } | |
.spinner i { | |
height: 20px; | |
width: 20px; | |
border-radius: 25px; | |
display: block; | |
position: absolute; } | |
.spinner i:before, .spinner i:after { | |
content: ''; | |
display: block; | |
position: absolute; | |
height: inherit; | |
width: inherit; | |
border-radius: inherit; } | |
.spinner i:first-child:before { | |
background: rgba(230, 45, 97, 0.9); | |
-webkit-animation: rotate-top-left 1.5s linear infinite; | |
-moz-animation: rotate-top-left 1.5s linear infinite; } | |
.spinner i:first-child:after { | |
background: rgba(255, 129, 58, 0.9); | |
-webkit-animation: rotate-top-right 1.5s linear infinite; | |
-moz-animation: rotate-top-right 1.5s linear infinite; } | |
.spinner i:last-child:before { | |
background: rgba(196, 92, 246, 0.9); | |
-webkit-animation: rotate-bottom-left 1.5s linear infinite; | |
-moz-animation: rotate-bottom-left 1.5s linear infinite; } | |
.spinner i:last-child:after { | |
background: rgba(19, 222, 186, 0.9); | |
-webkit-animation: rotate-bottom-right 1.5s linear infinite; | |
-moz-animation: rotate-bottom-right 1.5s linear infinite; } | |
@-webkit-keyframes spin { | |
0% { | |
-webkit-transform: rotate(0deg); } | |
50% { | |
-webkit-transform: rotate(-180deg); } | |
100% { | |
-webkit-transform: rotate(-360deg); } } | |
@-webkit-keyframes rotate-top-right { | |
0% { | |
-webkit-transform: rotate(0deg); } | |
50% { | |
-webkit-transform: rotate(-180deg); | |
-webkit-transform-origin: 20% 20%; } | |
100% { | |
-webkit-transform: rotate(-360deg); } } | |
@-webkit-keyframes rotate-top-left { | |
0% { | |
-webkit-transform: rotate(0deg); } | |
50% { | |
-webkit-transform: rotate(180deg); | |
-webkit-transform-origin: 80% 20%; } | |
100% { | |
-webkit-transform: rotate(360deg); } } | |
@-webkit-keyframes rotate-bottom-right { | |
0% { | |
-webkit-transform: rotate(0deg); } | |
50% { | |
-webkit-transform: rotate(-180deg); | |
-webkit-transform-origin: 80% 80%; } | |
100% { | |
-webkit-transform: rotate(-360deg); } } | |
@-webkit-keyframes rotate-bottom-left { | |
0% { | |
-webkit-transform: rotate(0deg); } | |
50% { | |
-webkit-transform: rotate(180deg); | |
-webkit-transform-origin: 20% 80%; } | |
100% { | |
-webkit-transform: rotate(360deg); } } | |
/* horizonal 3 dots loading animation */ | |
.loading-circle-container { | |
padding: 0 0 30px 0; | |
margin: 30px auto; | |
width: 36px; } | |
.loading-circle { | |
background-color: #2a2f33; | |
float: left; | |
height: 8px; | |
margin-left: 4px; | |
width: 8px; | |
-moz-animation-name: bounce_loading-circle; | |
-moz-animation-duration: 1.65s; | |
-moz-animation-iteration-count: infinite; | |
-moz-animation-direction: linear; | |
-moz-border-radius: 5px; | |
-webkit-animation-name: bounce_loading-circle; | |
-webkit-animation-duration: 1.65s; | |
-webkit-animation-iteration-count: infinite; | |
-webkit-animation-direction: linear; | |
-webkit-border-radius: 5px; | |
-ms-animation-name: bounce_loading-circle; | |
-ms-animation-duration: 1.65s; | |
-ms-animation-iteration-count: infinite; | |
-ms-animation-direction: linear; | |
-ms-border-radius: 5px; | |
-o-animation-name: bounce_loading-circle; | |
-o-animation-duration: 1.65s; | |
-o-animation-iteration-count: infinite; | |
-o-animation-direction: linear; | |
-o-border-radius: 5px; | |
-webkit-animation-name: bounce_loading-circle; | |
animation-name: bounce_loading-circle; | |
-webkit-animation-duration: 1.65s; | |
animation-duration: 1.65s; | |
-webkit-animation-iteration-count: infinite; | |
animation-iteration-count: infinite; | |
-webkit-animation-direction: linear; | |
animation-direction: linear; | |
border-radius: 5px; } | |
#loading-circle_1 { | |
-webkit-animation-delay: 0.33s; | |
-ms-animation-delay: 0.33s; | |
animation-delay: 0.33s; } | |
#loading-circle_2 { | |
-webkit-animation-delay: 0.77s; | |
-ms-animation-delay: 0.77s; | |
animation-delay: 0.77s; } | |
#loading-circle_3 { | |
-webkit-animation-delay: 0.99s; | |
-ms-animation-delay: 0.99s; | |
animation-delay: 0.99s; } | |
@-webkit-keyframes bounce_loading-circle { | |
50% { | |
background-color: #FFFFFF; } | |
} | |
@-ms-keyframes bounce_loading-circle { | |
50% { | |
background-color: #FFFFFF; } | |
} | |
@keyframes bounce_loading-circle { | |
50% { | |
background-color: #FFFFFF; } | |
} |
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
<div class="spinner"> | |
<i></i><i></i> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment