Css Translate Transform Code Example
Example 1: css transform transform : matrix ( 1 , 2 , 3 , 4 , 5 , 6 ) ; transform : matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 ) ; transform : translate ( 120 px , 50 % ) ; transform : scale ( 2 , 0.5 ) ; transform : rotate ( 0.5 turn ) ; transform : skew ( 30 deg , 20 deg ) ; transform : scale ( 0.5 ) translate ( - 100 % , - 100 % ) ; transform : perspective ( 17 px ) ; Example 2: transform:translateX() /* <length-percentage> values */ transform : translateX ( 200 px ) ; transform : translateX ( 50 % ) ; Example 3: css scale transform : scale ( sx , sy ) ; Example 4: css transform size . selector { transform : scale ( 1.2 ) ; // Will upscale to 1.2 }