Skip to content

Instantly share code, notes, and snippets.

@polyakoff
Created November 20, 2020 15:02
Show Gist options
  • Save polyakoff/1dd47c2945c1b7b07bb18a1a1d1eeb5a to your computer and use it in GitHub Desktop.
Save polyakoff/1dd47c2945c1b7b07bb18a1a1d1eeb5a to your computer and use it in GitHub Desktop.
whirlpool loader
# HTML
<div id="wrap_main_div">
<div class="cssload-container clearfix">
<div class="cssload-whirlpool"></div>
</div>
</div>
# CSS
/* for Wirphool */
div#wrap_main_div {
background-color: black;
width: 100%;
height: 300px;
}
.cssload-container {
position: relative;
top: 50%;
}
.cssload-container > .cssload-whirlpool,
.cssload-container > .cssload-whirlpool::before,
.cssload-container > .cssload-whirlpool::after {
position: absolute;
top: 50%;
left: 50%;
border: 1px solid rgb(255,255,255);
border-left-color: rgb(0,225,255);
border-radius: 974px;
-o-border-radius: 974px;
-ms-border-radius: 974px;
-webkit-border-radius: 974px;
-moz-border-radius: 974px;
}
.cssload-container > .cssload-whirlpool {
margin: -20px 0 0 -20px;
height: 49px;
width: 49px;
animation: cssload-rotate 2300ms linear infinite;
-o-animation: cssload-rotate 2300ms linear infinite;
-ms-animation: cssload-rotate 1150ms linear infinite;
-webkit-animation: cssload-rotate 1150ms linear infinite;
-moz-animation: cssload-rotate 1150ms linear infinite;
}
.cssload-container > .cssload-whirlpool::before {
content: "";
margin: -26px 0 0 -26px;
height: 43px;
width: 43px;
animation: cssload-rotate 2300ms linear infinite;
-o-animation: cssload-rotate 2300ms linear infinite;
-ms-animation: cssload-rotate 2300ms linear infinite;
-webkit-animation: cssload-rotate 2300ms linear infinite;
-moz-animation: cssload-rotate 2300ms linear infinite;
}
.cssload-container > .cssload-whirlpool::after {
content: "";
margin: -28px 0 0 -28px;
height: 60px;
width: 60px;
animation: cssload-rotate 2300ms linear infinite;
-o-animation: cssload-rotate 2300ms linear infinite;
-ms-animation: cssload-rotate 2300ms linear infinite;
-webkit-animation: cssload-rotate 2300ms linear infinite;
-moz-animation: cssload-rotate 2300ms linear infinite;
}
@keyframes cssload-rotate { 100% {transform: rotate(360deg);} }
@-o-keyframes cssload-rotate { 100% {-o-transform: rotate(360deg);} }
@-ms-keyframes cssload-rotate { 100% {-ms-transform: rotate(360deg);} }
@-webkit-keyframes cssload-rotate { 100% {-webkit-transform: rotate(360deg);} }
@-moz-keyframes cssload-rotate { 100% {-moz-transform: rotate(360deg);} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment