Move attribute: Translate
Scaling Properties: Scale
Rotation properties: roate
Tilt Properties: Skew
HTML: Define five properties to compare, link into CSS file
<! DOCTYPE html>
CSS file:
div{ width:200px; height:200px; Background: #20ff26; Margin:auto;} /* The distance between the X and Y axes is moved horizontally, the first parameter in translate () is the x-axis moving distance, the second parameter is the y-axis moving distance */.div2{transform:translate (100px,100px);} /* Rotation angle, Unit is deg*/.div3{transform:rotate (200DEG);} /* Scale effect, the first parameter is a multiple of the x-axis scale, and the second parameter is a multiple of the y-axis scale. Greater than 1 is magnification, less than 1 is reduced, 1 is normal multiple */.div4{ Transform:scale (0.5,0.5);} /* Tilt effect, the first parameter is the rotation angle around the x axis, the second parameter is the rotation angle around the y axis */.div5{ transform:skew (10deg,10deg);}
Implementation results:
CSS animations: Moving, zooming, rotating, skewing the implementation