CSS skew() Function
Example
.example {
transform: skew(45deg, 20deg);
}
Hello World!
Meaning
The skew() css function defines a transformation that skews an element on the 2D plane.
The coordinates of each point are modified by a value proportionate to the specified angle and the distance to the origin. Thus, the farther from the origin a point is, the greater the value added to it.
Version: CSS3
Standard Syntax
skew(angleX)
or
skew(angleX, angleY)
The skew() function is specified with either one or two values, which represent the amount of skewing to be applied in each direction.
If you only specify one value it is used for the x-axis and there will be no skewing on the y-axis.
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Function Arguments
The following table describes the arguments of this function.
Argument | Description |
---|---|
angleX | Defines the angle to use to distort the element along the x-axis (or abscissa). |
angleY | Defines the angle to use to distort the element along the y-axis (or ordinate). If not defined, its default value is 0, resulting in a purely horizontal skewing. |
See also
- transform
- <transform-function>
- skewX()
- skewY()
- Individual transform properties: