Transform property in CSS3

Source: Internet
Author: User

In CSS3, you can use the transform feature to rotate, scale, tilt, and move the four types of warp processing for text or images.

I. Rorate (rotation)

Usage: transform:rorate (45DEG);

A total of one parameter "angle", the unit deg is the meaning of degrees, positive number is clockwise rotation, negative number is counterclockwise rotation, the above code function is clockwise rotation 45 degrees.

Two. scale (zoom)

Usage: Transform:scale (0.5,3);

The first parameter represents scaling in the horizontal direction, and the second parameter represents a zoom multiplier in the vertical direction.

Three. Skew (tilt)

Usage: Transform:skew (30deg, 30deg);

The default origin of skew is that Transform-origin is the center point of this object.

The first parameter represents the tilt angle in the horizontal direction, and the second parameter represents the tilt angle in the vertical direction.

Four. Translate (mobile)

Usage: transform:translate (45px, 150px);

The first parameter represents a distance of 45 pixels in the horizontal direction, and the second parameter represents a distance of 150 pixels from a vertical inverse.

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.