Skip to content

Instantly share code, notes, and snippets.

@TerryMooreII
Created May 5, 2014 13:52
Show Gist options
  • Save TerryMooreII/f93c719835b33e373fda to your computer and use it in GitHub Desktop.
Save TerryMooreII/f93c719835b33e373fda to your computer and use it in GitHub Desktop.
Loading CSS animate
body{
padding:50px;
}
.loading .text{
font-size:1em;
color:red;
margin-bottom:10px;
font-family:helvetica;
}
.circle{
float:left;
margin-right:15px;
height:30px;
width:30px;
border-radius:30px;
background:red;
}
.one{
-webkit-animation: grow 2s infinite .1s ;
}
.two{
-webkit-animation: grow 2s infinite .2s;
}
.three{
-webkit-animation: grow 2s infinite .3s;
}
.four{
-webkit-animation: grow 2s infinite .4s;
}
.five{
-webkit-animation: grow 2s infinite .5s;
}
.six{
-webkit-animation: grow 2s infinite .6s;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes grow
{
0%, 100% {
-webkit-transform: scale(.5);
background:blue
}
50% {
-webkit-transform: scale(1.5);
background:red
}
}
/* Standard syntax
@keyframes grow
{
from {background: red;}
to {background: yellow;}
} */
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="loading">
<div class="text">Please wait..</div>
<div class="circle one"></div>
<div class="circle two"></div>
<div class="circle three"></div>
<div class="circle four"></div>
<div class="circle five"></div>
<div class="circle six"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment