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 ()