SASS Tile Fade animation effect
SASS Tile Fade animation
Here we use a SASS (SCSS) for loop to build a rotate animation of three tiles. We rotate each tile with animation-delay and the #sass:for loop delayed by one second each.
@for $i from 1 through 3 {
.tile-rotate:nth-child(#{$i}) {
animation-delay: #{$i}s;
}
}
@keyframes tile-fade {
0% { opacity: 1; }
50% { opacity: 0; }
80% { opacity: 0; }
100% { opacity: 0; }
}
- 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