CSS skewX()
Published Feb 19, 2026
skewX() is a CSS transform function that skews an element along the x-axis by the specified angle. It distorts the element horizontally, shifting its top and bottom edges left or right while preserving its vertical orientation.
Syntax
transform: skewX(<value>);
Parameters:
<angle>: Specifies the skew amount. Accepts any valid CSS angle unit:- Degrees (
deg) - Radians (
rad) - Gradians (
grad) - Turns (
turn)
- Degrees (
The value may be positive or negative.
Return value:
None. This function produces a transform value that modifies the element’s rendering when applied through the transform property.
Example 1: Skewing by Degrees
In this example, the element is skewed horizontally by 30deg:
.box {width: 50px;height: 60px;background-color: red;transform: skewX(30deg);}
The output of the code above is shown below:

Example 2: Skewing by Turns
In this example, the element is skewed horizontally by -0.2turn:
.box {width: 50px;height: 60px;background-color: red;transform: skewX(-0.2turn);}
The output of the code above is shown below:

Learn CSS on Codecademy
- Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
- Includes 34 Courses
- With Professional Certification
- Beginner Friendly.115 hours
- In this CSS tutorial, you’ll learn how to add CSS to visually transform HTML into eye-catching sites.
- Beginner Friendly.6 hours