CSS3 Moving Properties

Source: Internet
Author: User
This article mainly introduces the CSS3 Learning series of mobile properties in detail, small series feel very good, and now share to everyone, but also for everyone to do a reference. Follow the small series together to see it, hope to help everyone.

Transform function

Scaling down

Use the Sacle method to achieve the reduction of text or image, specify the magnification in the parameters, such as sacle (0.5) to reduce the 50%, the example is as follows:

<! DOCTYPE html>

In addition, you can specify the magnification of the horizontal direction of the element and the magnification of the vertical direction separately, for example:

<! DOCTYPE html>

Tilt

Using the skew method to skew the text or image, specify the tilt angle in the horizontal direction and the tilt angle in the vertical direction in the parameters, for example, "Skew (30deg,30deg)" means tilt 30 degrees horizontally and tilt 30 degrees vertically, as in the example below:

<! DOCTYPE html>

Rotating

Use the Rotate method to rotate the element, a parameter "angle", the unit deg to the meaning of the degree, positive number is clockwise rotation, negative number is counterclockwise rotation. Examples are as follows:

<! DOCTYPE html>

Move

Use the Translate method to move the text or image, specifying the distance between the moving distance and the vertical direction of the horizontal direction in the parameters. For example:

<! DOCTYPE html>

deform Example

Example 1:

<! DOCTYPE html>

This example is moved first, then rotated, and finally retracted.

Effect:

Example 2:

<! DOCTYPE html>

Rotate first, then indent, and finally move

Effect:

From the running results of the two examples, we can see that the elements are not in the same position on the two pages. Let's take a look at their detailed steps:

A first example:

1) first move the 150px to the right and move the 200px down.

2) then rotate 45 degrees and zoom in 1.5 times times.

A second example:

1) Rotate 45 degrees first and zoom in 1.5 times times.

2) then move the 150px to the right and move the 200px down.

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.