SVGFEImageElement:x 屬性
x 是 SVGFEImageElement 介面的只讀屬性,它將 SVG 濾鏡原語的位置的水平座標描述為一個 SVGAnimatedLength。
它反映了 <feImage> 元素的 x 屬性,該元素從外部源獲取影像資料並提供畫素資料作為輸出。該屬性是 <length> 或 <percentage>。<coordinate> 是使用者座標系統中的一個長度,表示與使用者座標系統原點沿 x 軸的給定距離。如果 x 屬性是百分比值,則屬性值相對於使用者座標系統單位中濾鏡區域的寬度。預設值為 0。
值
一個 SVGAnimatedLength 物件。
示例
js
const feImage = document.querySelector("feImage");
const leftPosition = feImage.x;
console.log(leftPosition.baseVal.value); // the `x` value
規範
| 規範 |
|---|
| 濾鏡效果模組第 1 級 # dom-svgfilterprimitivestandardattributes-x |
瀏覽器相容性
載入中…
另見
SVGFEImageElement.y- SVG 教程:濾鏡效果
- SVG 濾鏡基元屬性
- CSS
<blend-mode>資料型別 - CSS
mix-blend-mode屬性