Skip to content

Instantly share code, notes, and snippets.

@CoryDuncan
Created March 12, 2015 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CoryDuncan/55179ea0d9e5a27d2c9f to your computer and use it in GitHub Desktop.
Save CoryDuncan/55179ea0d9e5a27d2c9f to your computer and use it in GitHub Desktop.
Bounce Spinner
<!DOCTYPE html>
<html>
<head>
<title>Spinner</title>
<style>
.loader {
background: #fff;
height: 100%;
opacity: 1;
position: fixed;
transition: all 500ms ease;
width: 100%;
}
.spinner {
height: 40px;
left: 50%;
margin: -20px 0 0 -20px;
position: relative;
top: 50%;
width: 40px;
}
.spinner:before,
.spinner:after {
background-color: #00bdcc;
border-radius: 50%;
content: '';
height: 100%;
left: 0;
opacity: .6;
position: absolute;
top: 0;
width: 100%;
-webkit-animation: bounce 2s infinite ease-in-out;
animation: bounce 2s infinite ease-in-out;
}
.spinner:after {
-webkit-animation-delay: -1s;
animation-delay: -1s;
}
@-webkit-keyframes bounce {
0%, 100% {
-webkit-transform: scale(0);
}
50% {
-webkit-transform: scale(1);
}
}
@keyframes bounce {
0%, 100% {
transform: scale(0);
-webkit-transform: scale(0);
}
50% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
</style>
</head>
<body>
<div class="loader">
<div class="spinner"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment