CSS3 Explanation: Transform

Source: Internet
Author: User

Recently, the development speed of HTML5 and CSS3 is very considerable, there are some major stations at home and abroad, cool station are using the latest technology. In the face of new technology, how can we correctly grasp and use the project in the future? In response to this problem, Hao son decided to analyze CSS3, one by one like the students to answer CSS3 is a god horse thing. have already transform start, write bad words, please seriously shoot bricks!!

What is CSS3 transform?

The meaning of transform is: change, make ... to transform;

What are the common properties of CSS3 transform?

The properties of transform include: rotate ()/skew ()/scale ()/translate (,), and also X, Y, for example: Rotatex () and Rotatey (), and so on.

Let's break down the usage of each attribute:

Transform:rotate ():

Meaning: rotation, wherein "deg" is the meaning of "degree", such as "10deg" means "10 degrees" the same as below.

demo_transform1 { -webkit-transform : rotate ) -moz-transform : rotate ) }

Transform:skew ():

Meaning: Tilt;

demo_transform2 { -webkit-transform : skew ) -moz-transform : skew ) }

Transform:scale ():

Meaning: proportion; "1.5" means to enlarge by 1.5, if you want to enlarge twice times, you should write "2.0" and reduce the negative "-".

.DEMO_TRANSFORM3{-webkit-transform: Scale(1.5);-moz-transform: Scale(1.5)}

Transform:translate ():

Meaning: change, displacement; The following means that the right displacement of 120 pixels, if the upward displacement, the back of the "0" to change the value of the line, the left downward displacement is negative "-".

.DEMO_TRANSFORM4{-webkit-transform:Translate(120px,0);-moz-transform:Translate(120px,0)}

Transform synthesis:

The common properties of transform are these, and here we use transition's help to demonstrate a comprehensive example of CSS3 transform:

.DEMO_TRANSFORM5{-webkit-transition: All1sEase-in-out;-moz-transition: All1sEase-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)}

CSS3 Explanation: Transform

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.