CSS Animation features

Source: Internet
Author: User

"Animation features in CSS3"

/*1.Transition functionality, which is too much to be accomplished by specifying the start end state. *//*transition:property Duration timing-function*/transition-property:background-color;transition-duration:3s;transition-timing-function:linear;transition: Background-color 3s linear; /*A concise notation*/transition:background-color 1s linear,color 1s linear,width 1s linear;/*perform multiple animation effects at the same time*//*2.Animations function, you can specify frames to achieve complex animations. */@-webkit-keyframes MyColor{0%/*Start Frame*/{Background-color:Red; }40%/*Background color change frame-yellow*/{Background-color:#ffff00; }70%/*Background color change frame-blue*/{Background-color:Aqua; }100%/*End Frame*/{Background-color:Red; }}div:hover{-webkit-animation:MyColor 5s Linear; }/*animations that implement multiple property values while changing*/@-webkit-keyframes MyColor{0% {Background-color:Red;Transform:Rotate (0deg); }30%{Background-color:Aqua;Transform:Rotate (30deg); }60%{Background-color:Lightskyblue;Transform:Rotate ( -30deg); }100%{Background-color:Red;Transform:Rotate (0deg); }}div:hover{-webkit-animation-name:MyColor;-webkit-animation-duration:5s;-webkit-animation-timing-function:Linear;}/*parameter meaning*//*linear: Constant speed ease-in: Slow to fast ease-out: from fast to slow ease: first slow and then fast again slow ease-in-out: Slow and fast again slow*/
View Code

CSS Animation features

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.