Skip to content

Instantly share code, notes, and snippets.

@TerryMooreII
Created May 7, 2014 17:09
Show Gist options
  • Save TerryMooreII/0a82c2d543f4a375170b to your computer and use it in GitHub Desktop.
Save TerryMooreII/0a82c2d543f4a375170b to your computer and use it in GitHub Desktop.
Another loading css spinner
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="loading">
<div class="circle one"></div>
<div class="clearfix"></div>
<div class="circle two"></div>
<div class="circle three"></div>
<div class="clearfix"></div>
<div class="circle four"></div>
<div class="circle five"></div>
<div class="clearfix"></div>
<div class="circle six"></div>
<div class="circle seven"></div>
<div class="clearfix"></div>
<div class="circle eight"></div>
</div>
</body>
</html>
.loading{
height:40px;
width:40px;
-webkit-animation: spin 2s linear 0s infinite ;
/*
-webkit-animation:spin .7s infinite; */
}
.clearfix{
clear:both;
padding:0;
margin:0px;
}
.loading .circle{
float:left;
}
.circle{
height:10px;
width:10px;
border-radius:30px;
background:lightblue;
}
.one {
margin-top:0px;
margin-bottom:-5px;
margin-left: 15px;
}
.two {
margin-top:0px;
margin-left:5px;
}
.three {
margin-top:0px;
margin-left: 10px;
}
.four {
margin-top:0px;
margin-left: 0px;
}
.five {
margin-top:0px;
margin-left: 20px;
}
.six {
margin-top:0px;
margin-left: 5px;
}
.seven {
margin-top:0px;
margin-left: 10px;
}
.eight {
margin-top:-5px;
margin-left: 15px;
}
.one{
-webkit-animation: grow 1.5s infinite .1s ;
}
.two{
-webkit-animation: grow 1.5s infinite .8s;
}
.three{
-webkit-animation: grow 1.5s infinite .2s;
}
.four{
-webkit-animation: grow 1.5s infinite .7s;
}
.five{
-webkit-animation: grow 1.5s infinite .3s;
}
.six{
-webkit-animation: grow 1.5s infinite .6s;
}
.seven{
-webkit-animation: grow 1.5s infinite .4s;
}
.eight{
-webkit-animation: grow 1.5s infinite .5s;
}
@-webkit-keyframes spin{
0%{
-webkit-transform: rotate(0deg);
}
25%{
-webkit-transform: rotate(90deg);
}
50%{
-webkit-transform: rotate(180deg);
}
75%{
-webkit-transform: rotate(270deg);
}
100%{
-webkit-transform: rotate(360deg);
}
}
/* Chrome, Safari, Opera */
@-webkit-keyframes grow
{
0%, 100% {
-webkit-transform: scale(1);
background:green;
}
20%, 70%{
background:red;
}
50% {
background:red;
-webkit-transform: scale(.1);
background:red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment