CSS3 transform attribute and transform usage summary

Source: Internet
Author: User
In recent years, HTML5 and CSS3 rapid development, there are some major stations at home and abroad, cool station are using the latest technology, the browser of the manufacturers of their compatibility more and more good. There is a powerful attribute in the CSS3 Transform。 With this feature, various effects are easily handled. Quote a word "spin, jump, I don't Stop". Literally, Transform is the meaning of the variant, and his values mainly include rotating rotate, twisting skew, scaling scale, moving translate, and matrix morphing. Let's talk about this important attribute in CSS3.

First, you can learn the free course of PHP Chinese network.

1. Watch the transform properties in the CSS3 3D effects video Tutorial

2. Learn the CSS3 transform conversion tutorial in CSS3 from beginner to Mastery Tutorial

Transform Property

1. Implementation of CSS3 element 2D plane transform attribute transform

The shape transformation of CSS3 allows us to stretch, scale, and so on, and so on, I'm talking about the 12 D plane transformation Properties transform can be transformed transform is the meaning of deformation and it is mainly used by functions, the following function translate () Translation Transformation Ratate ( ) Rotation transform scale () Scaling transform skew () Tilt transform matrix () matrix transform Transform-origin The center shift transformation of the defined transformation

2. CSS3 about the Transform attribute realization div Indefinite width high vertical horizontal Center detailed introduction

The compatibility of transform is still relatively optimistic. IE9 The following is incompatible, IE9 supports instead of the-ms-transform attribute but only supports 2D conversions.

Google and Safari support replace the-webkit-transform attribute. IE9 above, Firefox and open Gate are compatible.

Presumably everyone in the actual project will meet the problem of P indefinite width and high vertical horizontal center. Remember the previous use JS to achieve.

In fact, there are several ways to implement CSS. But the individual feels that using transform to achieve simpler and more convenient is incompatible IE9 the following browsers.

3. CSS3 transform, transition and Animationsan three different attributes

In part of the test case, the transform properties are often shown as if they were driven. This makes a small number of intuitive thinking people think that the Transform property is an animated property. On the contrary, the Transform property is a static property that, once written into a style, will be directly displayed, without any change in process. Transform's main use is to do the special deformation of the elements, for the design of the person is not very unfamiliar, the simple is the CSS graphics deformation tool.

4. CSS Morph Transform property details

Transform: Deformation

Rotation: Rotate (): degrees

Chamfer: Skew (): degrees

Skewx

Skewy

Scaling: Scale (): positive, negative, decimal

ScaleX

ScaleY

Displacement: Translate (): CSS supported units can be

TranslateX

Translatey

Transform execution order: Post-write first execution

Transform:scale (2) rotate (50deg); Perform the rotation before scaling

5. Transform Properties in CSS

The Transform property in CSS allows you to modify the coordinate space of the CSS visual model. With transform, elements can be moved (translate), rotated (rotate), scaled (scale), and skewed (skew).

If the property has a value other than none, a cascading context will be generated. In this case, the object will be the containing block of the position:fixed element it contains (a containing block).

6. Impact of CSS3 transform on HTML document flow

After the body (or HTML) adds the transform attribute, the entire body DOM produces a corresponding transformation, but at this point the "whole" refers only to the standard document flow element under the body, for those position:absolute; /position:fixed; element, because it has been separated from the body of the document flow, so can not rely on the body of the transformation so that they can naturally achieve the corresponding transformation effect.

Related questions

1. Transform Why do I need two elements to make a scrolling effect

2. Transition transform does the initial display:block have no moving effect?

3. CSS3 transform how can the center rotate?

"Recommended"

1. PHP Chinese Web free video tutorial: "Php.cn lonely Nine Cheap (2)-css video Tutorial"

2. PHP Chinese Web free video tutorial: CSS3 Achieve smooth transition effect video tutorial

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.