Transition class Notes

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.