Css3 allows you to easily implement animation Transitions and css3transitions.

Source: Internet
Author: User

Css3 allows you to easily implement animation Transitions and css3transitions.

 

In software development, web front-end animation is an indispensable special effect. Before css3, most animations were implemented using reliable javascript, the steps are much more complex than those of css3 today. Although there are a lot of good frameworks. It is much easier to implement animations in css3. In css3, either transitions or animations is responsible for animation. Today I will share with you the usage of transitions. Browser support is not widely used here. If you cannot see the animation effect, it means that your browser does not support css3.

 

Here, let's take a look at the effect. Moving the data above will change.

 

Transition: [transition-property] | [transition-duration] | [transition-timing-function] | [transition-delay]

[Transition-property]:
Retrieves or sets the attributes of the object involved in the transition.
[Transition-duration]:
Retrieve or set the object transition duration
[Transition-timing-function]:
Retrieving or setting the animated types of transition in an object
[Transition-delay]:
Retrieves or sets the object delay transition

Below is the source code

 

    1. <! Doctype html>
    2. <Html>
    3. <Body>
    4.  
    5. <Div class = "a"> </div>
    6. <Div class = "a"> </div>
    7. <Div class = "a"> </div>
    8. <Div class = "a"> </div> <div class = "a"> </div> <div class = "a"> </div>
    9. <Style>
    10. . A {width: 300px; height: 30px; background: #0C9;-webkit-transition: width 1 s gradient, background-color 1 s gradient}
    11. . A: hover {background-color: #9C0; width: 150px; height: 30px;-webkit-transition: width 1 s gradient, background-color 1 s gradient}
    12. </Style>
    13. </Body>
    14. </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.