CSS skew() Function
Example
Use skew() to skew several <div> elements:
#myDiv1 {
transform: skew(15deg);
}
#myDiv2 {
transform: skew(15deg, 15deg);
}
#myDiv3 {
transform: skew(-15deg);
}
Try it Yourself »
More "Try it Yourself" examples below.
Definition and Usage
The CSS skew()
function is used to skew an
element along the x- and y-axis by the given angles.
The skew()
function is used within the
transform property.
Version: | CSS Transforms Module Level 1 |
---|
Browser Support
The numbers in the table specify the first browser version that fully supports the function.
Function | |||||
---|---|---|---|---|---|
skew() | 1 | 12 | 3.5 | 3.1 | 10.5 |
CSS Syntax
skew(ax, ay)
Value | Description |
---|---|
ax | Required. An angle. Specifies the skew along the x-axis |
ay | Optional. An angle. Specifies the skew along the y-axis. If omitted, the value is set to 0 |
More Examples
Example
Use skew() to skew images:
#img1 {
transform: skew(25deg);
}
#img2 {
transform:
skew(-25deg);
}
#img3 {
transform: skew(10deg, 10deg);
}
Try it Yourself »
Related Pages
CSS reference: CSS transform property.
CSS reference: CSS skewX() function.
CSS reference: CSS skewY() function.
CSS tutorial: CSS 2D transforms.