To make an element appear to grow faster as an animation progresses, use exponential scale values. CSS exp(x) returns e raised to x, where e is approximately 2.71828. Its JavaScript equivalent is Math.exp(x). section 3.2.4
Listing 3.8 Simulating exponential growth with exp()
@keyframes exponential-growth {
0% { transform: scale(1); }
50% { transform: scale(exp(1)); } #1
100% { transform: scale(exp(2)); } #2
}
.grow {
animation: exponential-growth 2s linear infinite;
}
The animation scales from 1 to exp(1) halfway through, then to exp(2) at the end. The corresponding JavaScript calculations are Math.exp(1) and Math.exp(2). section 3.2.4
Use Math.exp() when the same calculation needs to run in JavaScript, including when supporting browsers without CSS exp(). section 3.2.4
