Css3:3d Conversion

Source: Internet
Author: User

Several breakthroughs: (For more concise understanding, first ignore compatibility)

1. Understanding the coordinate system of 3D

Rotatex ()-----------element rotation around the x-axis

Rotatey ()-----------element rotates around the y-axis

Rotatez ()-----------element rotates around the y-axis

Transform:rotatex (20DEG);

2, perspective perspective, the principle is near large and small, only for the descendants of the elements

perspective:200px;

If you build a cube with a length and width of 100, when perspective<100, it is the equivalent of standing in the box to see, if the perspective is very large is the equivalent of standing in a very far place to see

3. Mobile

TranslateX-----Elements Moving on the x-axis
Translatey-----Elements move on the y-axis
Translatez-----Elements move on the z axis

Transform:translatez (100px);

4, Perspective-origin Point of view, is where the eyes look

perspective-origin:50% 50%;

The Perspective-origin property is not supported by the browser at this time.
Chrome and Safari support alternate-webkit-perspecitve-origin properties.

CSS3 3D Transform's pivot point is in front of the browser!

3. Use

The parent element plus the 3D view declaration, then its descendant elements will have the effect of a

transform-style:preserve-3d;

Css3:3d Conversion

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.