Using transtion to achieve transition animations

Source: Internet
Author: User
animations are divided into:

1.css3 Animation: (animation performance is much higher than JS)

1). Transition Animation (transition)  

2). Keyframe Animation (@keyframes, animation)  

2.js animations:

Transition Animation (Transition)

Syntax: (sometimes long units are seconds )

1. Change attribute (Transition-property (attribute name))

2. Duration (transition-duration (duration)) * This property must be available (the default time is "0")

3. Change Curve (transition-timing-function)

4. Length of delay (transition-delay)

* When the trigger time is lost, the animation will return to its original state.

transition-timing-function: Rate of change

1.ease (default): Fast and slow

2.ease-in: Fade In (animation changes slowly at first)

3,ease-out: Fade out (slow changes at the end of the animation)

4.ease-in-out: Fade in and fade out

5.linear: Constant Change

6.cubic-bezier: Bezier curves, all the changes Cubic-bezier (x1,y1,x2,y2) can be substituted with Bezier curves, and the X1,y1,x2,y2 values range from 0~1

Bezier graphs: (The following example will mention, do not do a detailed explanation)

transition animations do not have their own triggering time, only the following, can trigger transitions animation:

1.:hover (most commonly used)

2.:focus

3.:checked (Multi-select input box is checked for status)

4. Media Query (@media screen and (condition) {style})

5.js

<!        DOCTYPE html>
Related Article

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.