CSS De-Saturate animation effect
CSS De-Saturate animation
Animate the saturation of an HTML element with the filter#saturation CSS filter function.
<style>
.de-saturate {
/* Uncomment as needed. */
/* width: 100px; */
/* height: 100px; */
/* background-color: deeppink; */
animation-name: de-saturate;
animation-duration: 4s;
animation-iteration-count: infinite;
}
@keyframes de-saturate {
0% { }
100% { filter: saturate(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