Deformation treatment in CSS3 (transform) belongs to transform function classification 1. Rotation
Transform:rotate (45DEG);
The statement rotates the DIV element 45 degrees clockwise. DEG is an angular unit defined in the "Values and Units" module of CSS 3.
2. Zooming
Transform:scale (0.8,1);
Use the Zoom method to achieve the zoom effect of the text or image, specifying the magnification in the parameters. The statement uses the scale method to reduce the element horizontally by 20%, without scaling in the vertical direction.
3. Tilt
Transform:skew (30DEG,0DEG);
In this example, the skew method is used to tilt the element horizontally to 30 degrees and the disposition direction remains unchanged.
4. Mobile
Translate (50px,50px);
Use the Translate method to move text or images vertically 50 pixels in both horizontal and vertical directions.
Specify a datum point for the transformation
When you use the Transform method to deform a text or an image, the center point of the element is the datum point. Using the Transform-orign property, you can change the datum point of the deformation.
Transorm-origin:left Bottom;
Left and bottom are the positions of the datum points in the horizontal and vertical directions of the element.
Use multiple transformation methods on an element
Transform:rotate (45deg) scale (1.5) translate (50px,0px);
In this synthetic example, the text or image is rotated 45 degrees, then scaled 1.5 times times, finally moving horizontally 150 pixels, moving in the vertical direction 200 pixels.
Currently the Transform property needs to add a "-webkit-" prefix on the WebKit engine's Web browser, and the "-moz-" prefix needs to be added to the Fifefox browser, and the "-o-" prefix needs to be added to the Opera browser.
In CSS3, you can use the transform function to achieve the rotation, scaling, tilt, and movement of the text or image four types of deformation processing