SVGFEConvolveMatrixElement: width property
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Thuộc tính chỉ đọc width của giao diện SVGFEConvolveMatrixElement mô tả kích thước theo chiều ngang của một phần tử lọc SVG dưới dạng SVGAnimatedLength.
Nó phản ánh thuộc tính lọc width của phần tử <feConvolveMatrix>. Bộ lọc <feConvolveMatrix> áp dụng hiệu ứng tích chập ma trận, kết hợp các điểm ảnh trong ảnh đầu vào với các điểm ảnh lân cận để tạo ra các hiệu ứng tích chập như làm mờ, phát hiện cạnh, làm sắc nét, dập nổi hoặc vát mép. Thuộc tính là một <length> hoặc một <percentage> tương đối với chiều rộng của vùng bộ lọc. Giá trị mặc định là 100%. Giá trị thuộc tính là độ dài tính theo đơn vị hệ tọa độ người dùng.
Giá trị
Một SVGAnimatedLength.
Ví dụ
const feConvolveMatrix = document.querySelector("feConvolveMatrix");
const horizontalSize = feConvolveMatrix.width;
console.log(horizontalSize.baseVal.value); // the `width` value
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| Filter Effects Module Level 1> # dom-svgfilterprimitivestandardattributes-width> |
Tương thích trình duyệt
Xem thêm
SVGFEConvolveMatrixElement.height- CSS filter effects module
- SVG
<filter>element, SVGfilterattribute in SVG - Applying SVG effects to HTML content