Created
July 11, 2016 08:19
-
-
Save LeeCheneler/8db3911c2242a3f2318738e6109b3df9 to your computer and use it in GitHub Desktop.
Apply to a div for a spinner with a faded tail
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
.css-spinner-fading-tail { | |
border-radius: 50%; | |
background: -moz-linear-gradient(left, #dddddd 10%, rgba(0, 0, 0, 0) 82%); | |
background: -webkit-linear-gradient(left, #dddddd 10%, rgba(0, 0, 0, 0) 82%); | |
background: -o-linear-gradient(left, #dddddd 10%, rgba(0, 0, 0, 0) 82%); | |
background: -ms-linear-gradient(left, #dddddd 10%, rgba(0, 0, 0, 0) 82%); | |
background: linear-gradient(to right, #dddddd 10%, rgba(0, 0, 0, 0) 82%); | |
-webkit-animation: load3 1.4s infinite linear; | |
animation: load3 1.4s infinite linear; | |
-webkit-transform: translateZ(0); | |
-ms-transform: translateZ(0); | |
transform: translateZ(0); | |
} | |
.css-spinner-fading-tail:after { | |
background: #ffffff; | |
width: 75%; | |
height: 75%; | |
border-radius: 50%; | |
content: ''; | |
margin: auto; | |
position: absolute; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
} | |
@-webkit-keyframes load3 { | |
0% { | |
-webkit-transform: rotate(0deg); | |
transform: rotate(0deg); | |
} | |
100% { | |
-webkit-transform: rotate(360deg); | |
transform: rotate(360deg); | |
} | |
} | |
@keyframes load3 { | |
0% { | |
-webkit-transform: rotate(0deg); | |
transform: rotate(0deg); | |
} | |
100% { | |
-webkit-transform: rotate(360deg); | |
transform: rotate(360deg); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment