Do not understand how the matrix method of the transform attribute is used. No problem, please read these three articles first:
-A simple transformation method of transform attribute
-One of the matrix methods of transform attributes
-matrix method of transform attribute second matrix review matrix definition
Matrix Conversion Formula (A, B, C, D, TX, Ty)
X ' = a * x + c * y + tx
Y ' = b * x + d * y + ty Matrix to realize the theoretical analysis of symmetry effect
symmetric effect, that is, a line for the reference, the graphic folded.
Consider dispersing the graphic to a number of points, and the single point of symmetry along the vertical line is shown in the following illustration:
From the above graph symmetrical relation can know x = X '.
Assuming the coordinates of point A are (x, y) and the coordinates of a ' are (x ', y '), then the coordinates of a ' are represented by a point:
X ' =-X
Y ' = y
Combined with matrix conversion formula,
X ' =-1 * x + 0 * y + 0
Y ' = 0 * x + 1 * y + 0
Therefore, in order to achieve the symmetry effect, only the matrix method parameters A, B, C, D, TX, Ty, respectively, are set to -1,0,0,1,0,0. Sample Code
. matrix-style-symmetric {
Transform:matrix ( -1, 0, 0, 1, 0, 0);
}
Run effect