CSS Grow Step-wise animation effect
CSS Grow Step-wise animation
Step-wise Grow and shrink an HTML element using the transform#scale CSS tranform function.
<style>
.grow-step-wise {
/* Uncomment as needed. */
/* width: 100px; */
/* height: 100px; */
/* background-color: deeppink; */
animation-name: grow-step-wise;
animation-duration: 5s;
animation-iteration-count: infinite;
}
@keyframes grow-step-wise {
0% { transform: scale(0); }
12.5% { transform: scale(.5,.5); }
25% { transform: scale(0.2,.2); }
37.5% { transform: scale(1, 1); }
50% { transform: scale(.6, 0.6); }
62.5% { transform: scale(1.5,1.5); }
75% { transform: scale(.7, .7); }
75% { transform: scale(1, 1); }
100% { transform: scale(0); ; }
}
</style>
- 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