SVGFEImageElement: y 屬性

Baseline 已廣泛支援

此特性已相當成熟,可在許多裝置和瀏覽器版本上使用。自 ⁨2015 年 7 月⁩以來,各瀏覽器均已提供此特性。

SVGFEImageElement 介面的只讀屬性 y 將 SVG 濾鏡原語的位置的垂直座標描述為 SVGAnimatedLength

它反映了 <feImage> 元素的 y 屬性,該屬性從外部源獲取影像資料並提供畫素資料作為輸出。該屬性是 <length><percentage><coordinate> 是使用者座標系統中的一個長度,表示距離過濾器原點沿 y 軸的給定距離。如果 y 屬性是百分比值,則屬性值相對於使用者座標系統中的過濾器區域的高度。預設值為 0

一個 SVGAnimatedLength 物件。

示例

js
const feImage = document.querySelector("feImage");
const topPosition = feImage.y;
console.log(topPosition.baseVal.value); // the `y` value

規範

規範
濾鏡效果模組第 1 級
# dom-svgfilterprimitivestandardattributes-y

瀏覽器相容性

另見