body { background: #ff5555; color: #fff; padding-top: 120px; } #loader { font-size: 56px; margin: 0 auto; text-align: center; font-weight: bold; position: relative; &:after, &:before { content: ""; position: absolute; width: 100%; height: 65px; background: -webkit-linear-gradient(top, #ff5555, transparent); top: 0; left: 0; z-index: 1; transform: translateY(-50%); } &:after { bottom: 0; transform: translateY(50%); background: -webkit-linear-gradient(top, transparent, #ff5555); } > div { display: inline-block; width: 34.1563px; height: 65px; overflow: hidden; position: relative; div { transform: translateY(0); -webkit-animation-duration: 3s; -webkit-animation-delay: 1s; -webkit-animation-easing: ease-in-out; -webkit-animation-iteration-count: 10; -webkit-animation-fill-mode: forwards; @at-root { @for $i from 1 through 9 { @-webkit-keyframes yearAnimations#{$i} { 100% { transform: translateY(calc(-100% / 10 * #{$i})) } } } } } span { display: block; } } }