Variants-matrix matrices ()

Source: Internet
Author: User

Variants-matrix matrices ()

matrix () is a six-value (A,B,C,D,E,F) transformation matrix that specifies a 2D transformation that is equivalent to applying a [a B c D E F] transformation matrix directly. is to reposition the element based on the horizontal (x-axis) and vertical (Y-axis), this property value uses a matrix that involves mathematics, and I'm just saying here that the transform in CSS3 has such a property value, and if you need to understand it, you need to have some knowledge of the math matrix.

Example Demo: simulates the effect of translate () displacement in transform with the matrix () function.
HTML code:

<class= "wrapper">  <Div></  div></div>

CSS code:

. Wrapper{width:300px;Height:200px;Border:2px dotted Red;margin:40px Auto;}. Wrapper Div{width:300px;Height:200px;background:Orange;-webkit-transform:Matrix (1,0,0,1,50,50);-moz-transform:Matrix (1,0,0,1,50,50);Transform:Matrix (1,0,0,1,50,50);}

Demo Result:

<!DOCTYPE HTML><HTML><Head> <MetaCharSet= "Utf-8"><title>Morphing and animation</title><Linkhref= "Style.css"rel= "stylesheet"type= "Text/css"></Head> <Body><Divclass= "wrapper">  <Div></Div></Div></Body></HTML>
 .wrapper  { width :  300px ; :  200px ;  border :  2px dotted red ;  margin :  40px auto ;} .wrapper Div  {: 300px ; :  200px ;  background :  orange ; -webkit-transform :  matrix (1,0,0,1,100,100) ;  Transform :  matrix (1,0,0,1,100,100) ;} 

Variants-matrix matrices ()

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.