Skip to content

Instantly share code, notes, and snippets.

@pbuzdin
Created April 2, 2019 10:17
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 pbuzdin/356517913b3af7e85e7c1ab791191dab to your computer and use it in GitHub Desktop.
Save pbuzdin/356517913b3af7e85e7c1ab791191dab to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/xaleper
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
@keyframes loader {
33% {
background-image: linear-gradient(to bottom, rgba(0,0,255,0.1) 0%, rgba(0,0,255,0.1) 100%), linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%);
}
66% {
background-image: linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, rgba(0,0,255,0.1) 0%, rgba(0,0,255,0.1) 100%), linear-gradient(to bottom, blue 0%, blue 100%);
}
99% {
background-image: linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, rgba(0,0,255,0.1) 0%, rgba(0,0,255,0.1) 100%);
}
}
.Loader:before {
content: '';
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 50px;
height: 10px;
background-size: 10px;
background-image: linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%);
background-repeat: no-repeat, no-repeat, no-repeat;
background-position: left, center, right;
animation: loader 0.8s infinite;
}
</style>
</head>
<body>
<div class="Loader">
</div>
<script id="jsbin-source-css" type="text/css">@keyframes loader {
33% {
background-image: linear-gradient(to bottom, rgba(0,0,255,0.1) 0%, rgba(0,0,255,0.1) 100%), linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%);
}
66% {
background-image: linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, rgba(0,0,255,0.1) 0%, rgba(0,0,255,0.1) 100%), linear-gradient(to bottom, blue 0%, blue 100%);
}
99% {
background-image: linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, rgba(0,0,255,0.1) 0%, rgba(0,0,255,0.1) 100%);
}
}
.Loader:before {
content: '';
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 50px;
height: 10px;
background-size: 10px;
background-image: linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%);
background-repeat: no-repeat, no-repeat, no-repeat;
background-position: left, center, right;
animation: loader 0.8s infinite;
}
</script>
</body>
</html>
@keyframes loader {
33% {
background-image: linear-gradient(to bottom, rgba(0,0,255,0.1) 0%, rgba(0,0,255,0.1) 100%), linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%);
}
66% {
background-image: linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, rgba(0,0,255,0.1) 0%, rgba(0,0,255,0.1) 100%), linear-gradient(to bottom, blue 0%, blue 100%);
}
99% {
background-image: linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, rgba(0,0,255,0.1) 0%, rgba(0,0,255,0.1) 100%);
}
}
.Loader:before {
content: '';
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
width: 50px;
height: 10px;
background-size: 10px;
background-image: linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%), linear-gradient(to bottom, blue 0%, blue 100%);
background-repeat: no-repeat, no-repeat, no-repeat;
background-position: left, center, right;
animation: loader 0.8s infinite;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment