Created
February 12, 2019 15:48
-
-
Save wharley/d17d759173d834758bd42bf3a766b0f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<transition> | |
<div class="spinner"> | |
<div class="bounce1"></div> | |
<div class="bounce2"></div> | |
<div class="bounce3"></div> | |
</div> | |
</transition> | |
</template> | |
<script> | |
export default { | |
name: 'Spinner' | |
}; | |
</script> | |
<style scoped> | |
.spinner { | |
display: inline-flex; | |
justify-content: center; | |
align-items: center; | |
position: fixed; | |
z-index: 9999; | |
top: 0; | |
left: 0; | |
width: 100vw; | |
height: 100vh; | |
background-color: rgba(255, 255, 255, 0.75); | |
margin: 0; | |
} | |
.spinner > div { | |
width: 18px; | |
height: 18px; | |
background-color: red; | |
display: inline-flex; | |
justify-content: center; | |
border-radius: 100%; | |
/* display: inline-block; */ | |
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; | |
animation: sk-bouncedelay 1.4s infinite ease-in-out both; | |
} | |
.spinner .bounce1 { | |
-webkit-animation-delay: -0.32s; | |
animation-delay: -0.32s; | |
} | |
.spinner .bounce2 { | |
-webkit-animation-delay: -0.16s; | |
animation-delay: -0.16s; | |
} | |
@-webkit-keyframes sk-bouncedelay { | |
0%, 80%, 100% { -webkit-transform: scale(0) } | |
40% { -webkit-transform: scale(1.0) } | |
} | |
@keyframes sk-bouncedelay { | |
0%, 80%, 100% { | |
-webkit-transform: scale(0); | |
transform: scale(0); | |
} 40% { | |
-webkit-transform: scale(1.0); | |
transform: scale(1.0); | |
} | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment