CSS3 details: transform, css3 details transform

Source: Internet
Author: User

CSS3 details: transform, css3 details transform
What is CSS3 transform?

Transform means: change, make... Deformation and conversion

What are common attributes of CSS3 transform?

Transform attributes include: rotate ()/skew ()/scale ()/translate (,), and x and y, for example, rotatex () and rotatey (), and so on.

The following describes the usage of each attribute:

Transform: rotate ():

Description: rotation. "deg" indicates "degree", for example, "10deg" indicates "10 degrees.

Click here to view the instance display

.demo_transform1{-webkit-transform:rotate(10deg);-moz-transform:rotate(10deg)}

Transform: skew ():

Description: skew;

Click here to view the instance display

.demo_transform2{-webkit-transform:skew(20deg);-moz-transform:skew(20deg)}

Transform: scale ():

Meaning: proportion; "1.5" indicates that the proportion is increased by 1.5. If you want to enlarge it by 2 times, you must write it as "2.0", and then scale it down to "-".

Click here to view the instance display

.demo_transform3{-webkit-transform:scale(1.5);-moz-transform:scale(1.5)}

Transform: translate ():

Meaning: Change, displacement; the following shows a 120-pixel Shift to the right. If the shift is upward, you can change the value of "0" to the next value. If the shift to the left is negative "-".

Click here to view the instance display

.demo_transform4{-webkit-transform:translate(120px,0);-moz-transform:translate(120px,0)}

Transform integration:

These are the common attributes of transform. The following uses the help of transition to demonstrate a comprehensive example of css3 transform:

Click here to view the instance display

.demo_transform5{-webkit-transition:all 1s ease-in-out;-moz-transition:all 1s ease-in-out}
.demo_transform5:hover{-webkit-transform:rotate(360deg) skew(-20deg) scale(3.0) translate(100px,0);-moz-transform:rotate(360deg) skew(-20deg)scale(3.0) translate(100px,0)}

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.