Created
June 8, 2018 03:28
-
-
Save shshaw/e4f2c5c10489cb6636f417a1a34f3868 to your computer and use it in GitHub Desktop.
@Keyframes 1.8.2 | Overloadered 3
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
<div class="box"></div> | |
<div class="box"></div> |
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
$duration: 4s; | |
.box { | |
height: 1em; | |
width: 1em; | |
font-size: 10vmin; | |
background-color: #fff; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
margin: -.5em; | |
transform-origin: top right; | |
animation: box-flip $duration ease-in-out infinite; | |
&:nth-child(2) { | |
animation-delay: #{$duration / -2}; | |
} | |
} | |
@keyframes box-flip { | |
#{percentage(1/6)} { | |
transform: rotate(0); | |
} | |
#{percentage(2/6)} { | |
transform: rotate(.5turn); | |
} | |
#{percentage(3/6)} { | |
transform: rotate(.5turn); | |
} | |
#{percentage(4/6)} { | |
transform: rotate(.75turn); | |
} | |
#{percentage(5/6)} { | |
transform: rotate(.75turn); | |
} | |
#{percentage(6/6)} { | |
transform: rotate(1turn); | |
} | |
} | |
/* ---------------------------------- */ | |
html, body { | |
background: #000; | |
height: 100%; | |
width: 100%; | |
display: flex; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment