sample some cool paper loader
Created
June 23, 2017 08:44
-
-
Save bonaxcrimo/4da19b6eb7459582887cfe931d25cf9c to your computer and use it in GitHub Desktop.
paper preloader
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="container"> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
<div class="paper"></div> | |
</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
.container{ | |
position:relative; | |
margin:100px auto; | |
width:20px; | |
height:20px; | |
perspective:160px; | |
transform-style:preserve-3d; | |
} | |
.container .paper{ | |
width:35px; | |
height:45px; | |
background:#fff; | |
border:5px solid blueviolet; | |
position:absolute; | |
border-left:none; | |
transform-origin:0% 50%; | |
} | |
.container .paper:nth-child(2){ | |
transform:rotate(180deg); | |
} | |
.container .paper { | |
@for $i from 3 through 12{ | |
&:nth-child(#{$i}){ | |
animation : flip 2.5s infinite ease-in-out; | |
animation-delay:logarithm($i) *0.5s; | |
} | |
} | |
} | |
@keyframes flip{ | |
0%{} | |
30%{ | |
transform:rotateY(-180deg); | |
} | |
100%{ | |
transform:rotateY(-180deg); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment