img {
transform: rotate(10deg);
-webkit-transform: rotate(10deg);
-moz-transform: rotate(10deg);
-ms-transform: rotate(10deg);
}
img {
transform: rotateX(45deg);
-webkit-transform: rotateX(45deg);
-moz-transform: rotateX(45deg);
-ms-transform: rotateX(45deg);
}
img {
transform: rotateY(180deg);
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
-ms-transform: rotateY(180deg);
}
img {
transform: rotateZ(10deg);
-webkit-transform: rotateZ(10deg);
-moz-transform: rotateZ(10deg);
-ms-transform: rotateZ(10deg);
}
Available Values (Scale)
| Value | Effect |
| scale(number, number) | Specifies 'scaleX' and 'scaleY' together. The second number can be omitted; if omitted, the first value is used for both. Specify the scale factor as a number where '1.0' represents the element's original size. Note that units cannot be used — specify a plain number only. |
| scaleX(number) | Scales the element in the 'X direction'. Specify the scale factor as a number where '1.0' represents the element's original size. Note that units cannot be used — specify a plain number only. |
| scaleY(number) | Scales the element in the 'Y direction'. Specify the scale factor as a number where '1.0' represents the element's original size. Note that units cannot be used — specify a plain number only. |
| scaleZ(number) | Scales the element in the 'Z direction'. Specify the scale factor as a number where '1.0' represents the element's original size. Note that units cannot be used — specify a plain number only. |
| scale3d(numberX, numberY, numberZ) | Specifies 'scaleX', 'scaleY', and 'scaleZ' together. Specify the scale factor as a number where '1.0' represents the element's original size. Note that units cannot be used — specify a plain number only. |
img {
transform: scale(1.2, 0.8);
-webkit-transform: scale(1.2, 0.8);
-moz-transform: scale(1.2, 0.8);
-ms-transform: scale(1.2, 0.8);
}
img {
transform: scaleX(0.8);
-webkit-transform: scaleX(0.8);
-moz-transform: scaleX(0.8);
-ms-transform: scaleX(0.8);
}
img {
transform: scaleY(0.8);
-webkit-transform: scaleY(0.8);
-moz-transform: scaleY(0.8);
-ms-transform: scaleY(0.8);
}
img {
transform: scaleZ(0.8);
-webkit-transform: scaleZ(0.8);
-moz-transform: scaleZ(0.8);
-ms-transform: scaleZ(0.8);
}
img {
transform: scale3d(0.8, 1.2, 1.2);
-webkit-transform: scale3d(0.8, 1.2, 1.2);
-moz-transform: scale3d(0.8, 1.2, 1.2);
-ms-transform: scale3d(0.8, 1.2, 1.2);
}
Available Values (Skew)
| Value | Effect |
| skew(angle, angle) | Specifies 'skewX' and 'skewY' together. The second angle can be omitted; if omitted, it is treated as '0'. The direction is clockwise and the only supported unit is 'deg'. Negative values are also allowed. |
| skewX(angle) | Skews the element along the X-axis by the specified angle. The direction is clockwise and the only supported unit is 'deg'. Negative values are also allowed. |
| skewY(angle) | Skews the element along the Y-axis by the specified angle. The direction is clockwise and the only supported unit is 'deg'. Negative values are also allowed. |
img {
transform: skew(5deg, 10deg);
-webkit-transform: skew(5deg, 10deg);
-moz-transform: skew(5deg, 10deg);
-ms-transform: skew(5deg, 10deg);
}
img {
transform: skewX(10deg);
-webkit-transform: skewX(10deg);
-moz-transform: skewX(10deg);
-ms-transform: skewX(10deg);
}
img {
transform: skewY(10deg);
-webkit-transform: skewY(10deg);
-moz-transform: skewY(10deg);
-ms-transform: skewY(10deg);
}
Available Values (Translate)
| Value | Effect |
| translate(numberX, numberY) | Specifies 'translateX' and 'translateY' together. The second number can be omitted; if omitted, it is treated as '0'. The only supported unit is 'px'. Negative values are also allowed. |
| translateX(number) | Moves the element in the 'X direction' by the specified distance. The only supported unit is 'px'. Negative values are also allowed. |
| translateY(number) | Moves the element in the 'Y direction' by the specified distance. The only supported unit is 'px'. Negative values are also allowed. |
| translateZ(number) | Moves the element in the 'Z direction' by the specified distance. The only supported unit is 'px'. Negative values are also allowed. |
| translate3d(numberX, numberY, numberZ) | Specifies 'translateX', 'translateY', and 'translateZ' together. The only supported unit is 'px'. Negative values are also allowed. |
img {
transform: translate(10px, 20px);
-webkit-transform: translate(10px, 20px);
-moz-transform: translate(10px, 20px);
-ms-transform: translate(10px, 20px);
}
img {
transform: translateX(30px);
-webkit-transform: translateX(30px);
-moz-transform: translateX(30px);
-ms-transform: translateX(30px);
}
img {
transform: translateY(20px);
-webkit-transform: translateY(20px);
-moz-transform: translateY(20px);
-ms-transform: translateY(20px);
}
img {
transform: translateZ(20px);
-webkit-transform: translateZ(20px);
-moz-transform: translateZ(20px);
-ms-transform: translateZ(20px);
}
img {
transform: translate3d(10px, 20px, 20px);
-webkit-transform: translate3d(10px, 20px, 20px);
-moz-transform: translate3d(10px, 20px, 20px);
-ms-transform: translate3d(10px, 20px, 20px);
}