SVGFEBlendElement: 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 SVGFEBlendElement mô tả kích thước ngang của một SVG filter primitive dưới dạng SVGAnimatedLength.

Nó phản ánh thuộc tính filter primitive width của phần tử <feBlend>. Thuộc tính là <length> hoặc <percentage> tương đối với chiều rộng của vùng filter. Giá trị mặc định là 100%. Giá trị thuộc tính là độ dài trong đơn vị hệ tọa độ người dùng.

SVG filter <feBlend> pha trộn hai ảnh đầu vào với nhau bằng các chế độ pha trộn phổ biến trong phần mềm xử lý ảnh.

Giá trị

Một SVGAnimatedLength.

Ví dụ

js
const feBlend = document.querySelector("feBlend");
const horizontalSize = feBlend.width;
console.log(horizontalSize.baseVal.value); // the `width` value

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