SVGFEOffsetElement: 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 SVGFEOffsetElement mô tả tọa độ ngang của vị trí của một SVG filter primitive dưới dạng SVGAnimatedLength.
Nó phản ánh thuộc tính x của phần tử <feOffset>, phần tử này dịch chuyển ảnh đầu vào so với vị trí hiện tại của nó. Thuộc tính là <length> hoặc <percentage>. Giá trị mặc định là 0.
Giá trị
Một SVGAnimatedLength.
Ví dụ
js
const feOffset = document.querySelector("feOffset");
const leftPosition = feOffset.x;
console.log(leftPosition.baseVal.value); // the `x` value
Thông số kỹ thuật
| Specification |
|---|
| Filter Effects Module Level 1> # dom-svgfilterprimitivestandardattributes-x> |