$n: 16 $s: 1.5em $t: 1s * &, &:before, &:after margin: 0 padding: 0 +box-sizing(border-box) &:before, &:after content: '' html, body height: 100% .container &, *, *:before, *:after position: absolute top: 0 right: 0 bottom: 0 left: 0 margin: auto +transform-style(preserve-3d) width: $n * $s / 2 height: $s .thing &:before, &:after right: auto width: $s height: $s / $n background: #f06060 +transform-origin(right bottom 0) @for $i from 0 to $n &:nth-child(#{$i + 1}) &:before, &:after left: $i * $s / 2 &:before animation: thing $t -#{$i / $n * $t} linear infinite alternate &:after animation: thing $t -#{$i / $n * $t} linear infinite alternate-reverse +keyframes(thing) 0% +transform(rotateZ(45deg)) 100% +transform(rotateZ(-45deg))