DOMMatrixReadOnly: skewY() method
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
Note: This feature is available in Web Workers.
Phương thức skewY() của giao diện DOMMatrixReadOnly trả về một DOMMatrix mới được tạo bằng cách áp dụng phép biến đổi xiên được chỉ định lên ma trận nguồn dọc theo trục y. Ma trận gốc không bị thay đổi.
Để thay đổi ma trận khi làm xiên dọc theo trục y, hãy xem DOMMatrix.skewYSelf().
Cú pháp
js
skewY()
skewY(sY)
Tham số
sY-
Một số; góc tính bằng độ để làm xiên ma trận dọc theo trục y.
Giá trị trả về
Một DOMMatrix.
Ví dụ
js
const matrix = new DOMMatrix(); // tạo một ma trận
console.log(matrix.toString()); // giá trị gốc
// "matrix(1, 0, 0, 1, 0, 0)"
console.log(matrix.skewY(14).toString()); // làm xiên dọc theo trục y
// "matrix(1, -0.25, 0, 1, 0, 0)"
console.log(matrix.toString()); // ma trận gốc không thay đổi
// "matrix(1, 0, 0, 1, 0, 0)"
Thông số kỹ thuật
| Specification |
|---|
| Geometry Interfaces Module Level 1> # dom-dommatrixreadonly-skewy> |
Tương thích trình duyệt
Xem thêm
DOMMatrix.skewYSelf()DOMMatrixReadOnly.skewX()- CSS
transformproperty and theskew(),skewY(), andmatrix()functions - CSS transforms module
- SVG
transformattribute CanvasRenderingContext2Dinterface'stransform()method