SVGFEComponentTransferElement: 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 SVGFEComponentTransferElement mô tả kích thước theo chiều ngang của primitive bộ lọc SVG dưới dạng SVGAnimatedLength.
Nó phản ánh thuộc tính bộ lọc primitive width của phần tử <feComponentTransfer>. Thuộc tính là <length> hoặc <percentage> tương đối so 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 theo đơn vị hệ tọa độ người dùng.
Giá trị
Một SVGAnimatedLength.
Ví dụ
js
const feComponentTransfer = document.querySelector("feComponentTransfer");
const horizontalSize = feComponentTransfer.width;
console.log(horizontalSize.baseVal.value); // giá trị `width`
Thông số kỹ thuật
| Specification |
|---|
| Filter Effects Module Level 1> # dom-svgfilterprimitivestandardattributes-width> |
Tương thích trình duyệt
Xem thêm
SVGFEComponentTransferElement.height- Các phần tử
<feFuncR>,<feFuncG>,<feFuncB>,<feFuncA>