

When the CSS animation finishes the transitionend event triggers. These values are rarely used, because that’s not really animation, but rather a single-step change. step-end – the same as steps(1, end): make the animation in a single step at the end of transition-duration.So it starts and finishes immediately, as if there were no animation. That is, the animation starts immediately and takes 1 step. step-start – is the same as steps(1, start).Here’s steps(9, end) in action (note the pause between the first digit change): 1s – -10% (first change at the end of the 1st second).0s – 0 (during the first second nothing changes).So the process for steps(9, end) would go like this: The alternative value end would mean that the change should be applied not in the beginning, but at the end of each second. (the last second shows the final value).0s – -10% (first change in the beginning of the 1st second, immediately).We can observe that during the animation: when we click on the digit it changes to 1 (the first step) immediately, and then changes in the beginning of the next second. The start means that in the beginning of animation we need to make the first step immediately. The second argument is one of two words: start or end. The time interval is automatically divided into 9 parts as well, so transition: 9s gives us 9 seconds for the whole animation – 1 second per digit. The transform will be split into 9 parts (10% each). The first argument of steps(9, start) is the number of steps. That can be specified by the curve cubic-bezier(0, 0, 1, 1). The simplest variant is when the animation goes uniformly, with the same linear speed. The y axis specifies the completion of the process: 0 – the starting value of the property, 1 – the final value.The x axis is the time: 0 – the start, 1 – the end of transition-duration.The timing function describes how fast the animation process goes. Here we need to specify only 2nd and 3rd control points, because the 1st one is fixed to (0,0) and the 4th one is (1,1).

The syntax for a Bezier curve in CSS: cubic-bezier(x2, y2, x3, 圓).


The timing function can be set as a Bezier curve with 4 control points that satisfy the conditions: Let’s start with the curve, as it’s used more often. That property accepts two kinds of values: a Bezier curve or steps. But it becomes very simple if we devote a bit time to it. It appears to be the most complicated property at first. Will it start slowly and then go fast, or vice versa. The timing function describes how the animation process is distributed along its timeline. for instance, -3s here starts the animation from the 3rd second Here the animation shifts numbers from 0 to 9 using CSS translate property: For example, if transition-delay is -1s and transition-duration is 2s, then animation starts from the halfway point and total duration will be 1 second. Then the animation is shown immediately, but the starting point of the animation will be after given value (time). For instance, if transition-delay is 1s and transition-duration is 2s, then the animation starts 1 second after the property change and the total duration will be 2 seconds. In transition-delay we can specify the delay before the animation. The time should be in CSS time format: in seconds s or milliseconds ms. In transition-duration we can specify how long the animation should take. However, most of the generally used properties are animatable. Or we could write all, which means “animate all properties”.ĭo note that, there are properties which can not be animated. In transition-property, we write a list of properties to animate, for instance: left, margin-left, height, color. Now, let’s cover animation properties one by one.
