SVGFEComponentTransferElement: x 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 x của giao diện SVGFEComponentTransferElement mô tả tọa độ ngang của vị trí primitive bộ lọc SVG dưới dạng SVGAnimatedLength.

Nó phản ánh giá trị thuộc tính bộ lọc primitive x của phần tử <feComponentTransfer>. Thuộc tính là <length> hoặc <percentage>. <coordinate> là độ dài trong hệ tọa độ người dùng xác định khoảng cách từ gốc tọa độ dọc theo trục x. Nếu thuộc tính x là giá trị phần trăm, giá trị thuộc tính là tương đối so với chiều rộng của vùng bộ lọc theo đơn vị hệ tọa độ người dùng. Giá trị mặc định là 0.

Giá trị

Một SVGAnimatedLength.

Ví dụ

js
const feComponentTransfer = document.querySelector("feComponentTransfer");
const leftPosition = feComponentTransfer.x;
console.log(leftPosition.baseVal.value); // giá trị `x`

Thông số kỹ thuật

Specification
Filter Effects Module Level 1
# dom-svgfilterprimitivestandardattributes-x

Tương thích trình duyệt

Xem thêm