Skip to content

Instantly share code, notes, and snippets.

@RGHuynh
Created June 29, 2018 07:13
Show Gist options
  • Select an option

  • Save RGHuynh/b97565d21cd6d68b7434cec5a55c55fb to your computer and use it in GitHub Desktop.

Select an option

Save RGHuynh/b97565d21cd6d68b7434cec5a55c55fb to your computer and use it in GitHub Desktop.
CSS Spinner animation
<div class="wrap">
<h1>SPINNERS</h1>
<div class="spinner spinner-1"></div>
</div>
.spinner {
width: 100px;
height: 100px;
background: #eee;
border-radius: 50%;
position: relative;
margin: 50px;
display: inline-block;
}
.spinner:after{
content: '';
display: block;
width: 100px;
height: 100px;
border-radius: 50%;
}
.spinner-1:after {
position: absolute;
top: -4px;
left: -4px;
border: 4px solid transparent;
border-top-color: orangered;
border-bottom-color: orangered;
animation: spinny 2s linear infinite;
}
@keyframes spinny {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment