Skip to content

Instantly share code, notes, and snippets.

@nealnote
Last active January 3, 2016 10:49
Show Gist options
  • Save nealnote/8451747 to your computer and use it in GitHub Desktop.
Save nealnote/8451747 to your computer and use it in GitHub Desktop.
css3 loading
<!DOCTYPE HTML>
<html>
<head>
<meta charset='utf-8'>
<title>loading</title>
</head>
<body>
<style type="text/css">
@keyframes rotate-loading {
0% {transform: rotate(0deg);}
100% {transform: rotate(360deg);}
}
@-moz-keyframes rotate-loading {
0% {-moz-transform: rotate(0deg);}
100% {-moz-transform: rotate(360deg);}
}
@-webkit-keyframes rotate-loading {
0% {-webkit-transform: rotate(0deg);}
100% {-webkit-transform: rotate(360deg);}
}
@keyframes loading-text-opacity {
0% {opacity: 0}
20% {opacity: 0}
50% {opacity: 1}
100%{opacity: 0}
}
@-moz-keyframes loading-text-opacity {
0% {opacity: 0}
20% {opacity: 0}
50% {opacity: 1}
100%{opacity: 0}
}
@-webkit-keyframes loading-text-opacity {
0% {opacity: 0}
20% {opacity: 0}
50% {opacity: 1}
100%{opacity: 0}
}
.loading {
margin: 200px auto 0;
width: 100px;
height: 100px;
border: 2px solid transparent;
border-color: transparent #1cc3e8 transparent #1cc3e8;
border-radius: 100%;
-webkit-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
-webkit-animation: rotate-loading 1.5s linear 0s infinite normal;
-webkit-transform-origin: 50% 50%;
}
</style>
<div class="loading"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment