There are 2 places where you can set the synchronization function: globally in the same place where you set the animation, or in the keyframe rule.
But in the latter case, you always have n key frames and n - 1 time intervals. In your case, 2 key frames and 1 time interval.
The synchronization function indicated on the key frame refers to the time interval that begins in this key frame.
So, the correct way to apply the synchronization function on key frames would be on the first:
@keyframes iconEnter { 0% { transform: scale(0.1); animation-timing-function: cubic-bezier(.25,8,.25,-8); } 100% { transform: scale(1); } } div { width: 100px; height: 100px; margin: 100px; background-color: tomato; transform: scale(0.1); } body:hover div { animation: iconEnter 4s forwards; }
<div></div>
vals
source share