Transition
One, what is transition (transition)?
1,transition allows the CSS element's attribute values to smoothly transition within a certain time interval.
2, you can add an effect to an element when the element is transformed from one style to another without using Flash animation or JavaScript. This effect can be triggered by clicking on the mouse, getting focus, being clicked, or any change to the element, and animating the CSS property values in a sleek and animated manner.
Second, the commonly used properties;
The 1,transition property consists primarily of four property values:
1), used to specify that when one of the attributes of an element is changed, the transition effect is performed, which has the following values: None (no property changes); All (change all properties) This is also its default value; Indent (element property name), when its value is None, Transition stops executing immediately, and when specified as all, the element will perform the transition effect when any property value changes occur;
2), Transition-duration--Define the time spent on transition effects, default is 0;
3), Transition-timing-function--allows to change the conversion rate of the attribute value according to the time of the propulsion,
Transition-timing-function has 6 possible values:
A, Ease: (gradual slow) default value
B, Linear: (constant speed), linear
C, ease-in: (acceleration)
D, Ease-out: (deceleration),
E, Ease-in-out: (Acceleration and deceleration)
F, Cubic-bezier: (this value allows you to customize a time curve) for a specific cubic-bezier curve. (x1, y1, x2, y2) four values are specific to point P1 and Point P2 on a curve. All values must be in the [0, 1] area, otherwise invalid.
4), Transition-delay--is used to specify the time when an animation starts executing, that is, how long it takes to start the transition effect after changing the attribute value of the element, which is 0 by default.
5), transition-shorthand property, used to set four transition properties in one property. To add a transition effect to multiple styles, add multiple attributes separated by commas.
such as: Transition: <property> <duration> <animation type> <delay> as shown in the Lesson Preparation folder:
Transition class Notes