mixin divs(n)
mixin divs(n)
- var i = 0
while i < n
div
- i++
.flex-preserve.box-4
+divs(100)
.flex-preserve.box-3
+divs(50)
.flex-preserve.box-2
+divs(10)
.flex-preserve
+divs(6)
body,
body,
html
margin 0
padding 0
width 100%
height 100%
base-c = #e91e63
ideg = 90
.flex-preserve
display flex
height 25%
perspective 50px
transform-style preserve-3d
width 600px
&>div
align-items center
animation i3d 1s linear infinite alternate
background-color spin(base-c,1 * ideg)
height 55px
justify-content space-around
margin auto
transition transform .2s ease-in-out
width 55px
/* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */
.box-2
&>div
background-color spin(base-c,2 * ideg)
width 20px
for row in 1 .. 10
div:nth-child({row})
animation-delay unquote(''+(row * 50) +'ms')
@keyframes i3d
to
transform translate3d(0,0,-200px) scale3d(5,5,5)
/* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */
.box-3
perspective 200px
&>div
animation-name is-3d-2
background-color spin(base-c,3 * ideg)
height 50px
width 5px
for row in 1 .. 50
div:nth-child({row})
animation-delay unquote(''+(row * 50) +'ms')
@keyframes is-3d-2
to
transform translate3d(0,0,-100px) scale3d(0,0,0)
/* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */
.box-4
&>div
animation-name is-3d-3
animation-timing-function ease-in
background-color spin(base-c,4 * ideg)
for row in 1 .. 100
div:nth-child({row})
animation-delay unquote(''+(row * 10) +'ms')
@keyframes is-3d-3
to
transform rotate3d(0,0,1,(360deg * 5)) translate3d(0px,333px,-250px)