Everyone knows the transformattribute of CSS3, because we often use it, so today I will give you a good analysis of how to use this transform, what is the transform? Usage and grammar.
Syntax: none|FunctionValue:
matrix(): Define matrix transformation. translate(): Move elementobject.
scale(): Scale element object. rotate(): Rotate element object. skew(): Skew element object. For example (compatible with browsers): 1.rotate() function: transform: rotate(-90deg);-o-transform: rotate(-90deg);-moz-transform: rotate(-90deg);-webkit-transform: rotate(-90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3); 2.scale() function: transform: scale(2 );-o-transform: scale(2);-moz-transform: scale(2);-webkit-transform: scale(2); When passing different parameter values for scale, scaling 3.translate() function: transform: translate(4px, 6px);-o-transform: translate(4px, 6px);-moz-transform:translate(4px, 6px);-webkit-transform : translate(4px, 6px); The parameter can be a negative pixel value. 4.skew() function: transform: skew(30deg, -20deg);-o-transform: skew(30deg, -20deg);-moz-transform: skew(30deg, -20deg);- webkit-transform: skew(30deg, -20deg); will change the shape of the element, but the rotate function will not change the shape of the element. 5.matrix() function: transform: matrix(3,2,3,5,0,0);-o-transform: matrix(3,2,3,5,0,0); -moz-transform: matrix(3,2,3,5,0,0);-webkit-transform: matrix(3,2,3,5,0,0); The parameters are 6 values.CSS3’s detailed introduction to the translate attribute
CSS3’s detailed introduction to the background-size attribute
Tutorial on using the transform attribute in Css3
The above is the detailed content of How to use the transform attribute in CSS3. For more information, please follow other related articles on the PHP Chinese website!