SASS Tile Flip animation effect

SASS Tile Flip animation

Here we use a SASS (SCSS) for loop to animate three tiles. We flip each tile with animation-delay and the #sass:for loop delayed by one second each.

@for $i from 1 through 3 { .tile:nth-child(#{$i}) { animation-delay: #{$i}s; } } @keyframes tile-flip { 0% { transform: scale(1, 1); } 50% { transform: scale(0, 1); } 100% { transform: scale(1, 1); } }
    Hints:
  • If you cannot see your HTML element when using our code, you may need to set a width and or height, or background on your target HTML element using CSS. Just uncomment the CSS properties in our code as needed.
  • Remove the HTML style tag as needed.
  • Change values in the code such as animation-duration as needed.
Animation effects source code licenced under MIT Licence