Created
December 19, 2018 23:46
-
-
Save nyk0r/64ca9255f1c8eaebed77022f2e76c236 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.spinner { | |
background-color: transparent; | |
position: relative; | |
} | |
.spinner__square-1, | |
.spinner__square-2, | |
.spinner__square-3 { | |
border-radius: 2px; | |
position: absolute; | |
height: 24px; | |
width: 24px; | |
} | |
.spinner__square-1 { | |
background-color: #f3dcb2; | |
animation: spinner__square-1-move 2s infinite linear; | |
} | |
@keyframes spinner__square-1-move { | |
0% { | |
left: 0; | |
top: 0; | |
} | |
25% { | |
left: 30px; | |
top: 0; | |
} | |
50% { | |
left: 30px; | |
top: 30px; | |
} | |
75% { | |
left: 0; | |
top: 30px; | |
} | |
100% { | |
left: 0; | |
top: 0; | |
} | |
} | |
.spinner__square-2 { | |
background-color: #1154ad; | |
animation: spinner__square-2-move 2s infinite linear; | |
} | |
@keyframes spinner__square-2-move { | |
0% { | |
left: 30px; | |
top: 0; | |
} | |
25% { | |
left: 30px; | |
top: 30px; | |
} | |
50% { | |
left: 0; | |
top: 30px; | |
} | |
75% { | |
left: 0; | |
top: 0; | |
} | |
100% { | |
left: 30px; | |
top: 0; | |
} | |
} | |
.spinner__square-3 { | |
background-color: #c7cdd5; | |
animation: spinner__square-3-move 2s infinite linear; | |
} | |
@keyframes spinner__square-3-move { | |
0% { | |
left: 30px; | |
top: 30px; | |
} | |
25% { | |
left: 0; | |
top: 30px; | |
} | |
50% { | |
left: 0; | |
top: 0; | |
} | |
75% { | |
left: 30px; | |
top: 0; | |
} | |
100% { | |
left: 30px; | |
top: 30px; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div class="spinner"> | |
<div class="spinner__square-1"></div> | |
<div class="spinner__square-2"></div> | |
<div class="spinner__square-3"></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment