Introduction and usage examples of transform, transition and animation in CSS3, css3transform

Source: Internet
Author: User

Introduction and usage examples of transform, transition and animation in CSS3, css3transform
Transform is an attribute, which is essentially the same as width and height. In addition, transform adds a transform attribute for the class.
Transition is an attribute used to control the transition effect, because transform can increase the transformation effect, and the transformation is an instantaneous mutation. If you want this change to be smooth and transitional, you must use transition to control the attributes and transition time.
Animation is an animation effect. You must first define an animation process with @ keyframes, and then use the parameters of animation in the class to specify the name, running time, and running times of the animation you want to add.
/* Float using transition */. float {transition-property: transform; transition-duration:. 3 s ;}. float: hover {transform: translateY (-5px );}

/* Pulse using animation */@ keyframes pulse {25% {transform: scale (1.1);} 75% {transform: scale (. 9 );}}. pulse {}. pulse: hover {animation-name: pulse; animation-duration: 1 s; animation-timing-function: linear; animation-iteration-count: infinite ;}

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.