--- id: css-2d-transform-skew-and-matrix title: "CSS 2D Transform Skew and Matrix" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["skew()", "skewX()", "skewY()", "matrix()", "CSS skew", "2D matrix transform"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.88 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["css", "web", "frontend", "w3schools", "transform", "2d-transform", "skew", "matrix"] raw_sources: ["https://www.w3schools.com/css/css3_2dtransforms_skew.asp"] applied_in: [] github_commit: "" --- # [[CSS 2D Transform Skew and Matrix]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) The `skewX()`, `skewY()`, and `skew()` functions slant an element along the X- and/or Y-axis by a given angle, while `matrix()` combines all 2D transform methods (translate, rotate, scale, skew) into one six-value declaration. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **`skewX()`** β€” skews an element along the X-axis by the given angle. [S1] - **`skewY()`** β€” skews an element along the Y-axis by the given angle. [S1] - **`skew()`** β€” skews an element along both the X- and Y-axis; if the second parameter is omitted it defaults to zero. [S1] - **`matrix()`** β€” combines all the 2D transform methods into one, taking six parameters in the order `matrix(scaleX(), skewY(), skewX(), scaleY(), translateX(), translateY())`. [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Angular slant** β€” skew functions take angle values (`deg`); `skew(ax, ay)` slants along both axes at once. [S1] - **Unified transform** β€” `matrix()` packs scale, skew, and translate into a single function call for compact combined transforms. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) **The CSS `skewX()` Function** The `skewX()` function skews an element along the X-axis by the given angle. The following example skews the `
` element 20 degrees along the X-axis: [S1] ```css div { transform: skewX(20deg); } ``` **The CSS `skewY()` Function** The `skewY()` function skews an element along the Y-axis by the given angle. The following example skews the `
` element 20 degrees along the Y-axis: [S1] ```css div { transform: skewY(20deg); } ``` **The CSS `skew()` Function** The `skew()` function skews an element along the X- and Y-axis by the given angles. The following example skews the `
` element 20 degrees along the X-axis, and 10 degrees along the Y-axis: [S1] ```css div { transform: skew(20deg, 10deg); } ``` If the second parameter is not specified, it has a zero value. So, the following example skews the `
` element 20 degrees along the X-axis: [S1] ```css div { transform: skew(20deg); } ``` **The CSS `matrix()` Function** The `matrix()` function combines all the 2D transform methods into one. The `matrix()` method takes six parameters, containing mathematic functions, which allow you to rotate, scale, move (translate), and skew elements. The parameters are as follow: `matrix(scaleX(), skewY(), skewX(), scaleY(), translateX(), translateY())`. [S1] ```css div { transform: matrix(1, -0.3, 0, 1, 0, 0); } ``` **CSS Transform Properties** The following table lists the CSS transform properties: [S1] | Property | Description | |----------|-------------| | `transform` | Applies a 2D or 3D transformation to an element | | `transform-origin` | Allows you to change the position on transformed elements | **CSS 2D Transform Functions** The following table lists the 2D transform functions: [S1] | Function | Description | |----------|-------------| | `matrix(n,n,n,n,n,n)` | Defines a 2D transformation, using a matrix of six values | | `translate(x,y)` | Defines a 2D translation, moving the element along the X- and Y-axis | | `translateX(n)` | Defines a 2D translation, moving the element along the X-axis | | `translateY(n)` | Defines a 2D translation, moving the element along the Y-axis | | `scale(x,y)` | Defines a 2D scale transformation, changing the element's width and height | | `scaleX(n)` | Defines a 2D scale transformation, changing the element's width | | `scaleY(n)` | Defines a 2D scale transformation, changing the element's height | | `rotate(angle)` | Defines a 2D rotation, the angle is specified in the parameter | | `skew(x-angle,y-angle)` | Defines a 2D skew transformation along the X- and the Y-axis | | `skewX(angle)` | Defines a 2D skew transformation along the X-axis | | `skewY(angle)` | Defines a 2D skew transformation along the Y-axis | ## πŸ› οΈ 적용 사둀 (Applied in summary) The page applies skewing to a `
` (`skewX(20deg)`, `skewY(20deg)`, `skew(20deg, 10deg)`, `skew(20deg)`) and demonstrates a combined transform via `matrix(1, -0.3, 0, 1, 0, 0)`. No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Skew along axes (language: CSS): ```css div { transform: skew(20deg, 10deg); } ``` Combined matrix transform: ```css div { transform: matrix(1, -0.3, 0, 1, 0, 0); } ``` ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) No contradictions found in the source. ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual (μ‹€μ œ 적용 사둀 발견 μ‹œ applied/validated둜 승격 κ°€λŠ₯) - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.88 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[CSS Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CSS 2D Transform Scale]], [[CSS 3D Transforms]], [[CSS Transitions]] - **μ°Έμ‘° λ§₯락:** Completes the CSS 2D transform set; `matrix()` is the low-level form into which the other 2D functions compile. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS 2D Transform Skew and Matrix β€” https://www.w3schools.com/css/css3_2dtransforms_skew.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS 2D Transform Skew and Matrix" page (Astra wiki-curation, P-Reinforce v3.1 format).