SVGFEColorMatrixElement: x 屬性
x 只讀屬性是 SVGFEColorMatrixElement 介面的一部分,它將 SVG 濾鏡圖元的水平座標描述為一個 SVGAnimatedLength 物件。
它反映了 <feColorMatrix> 元素的 x 濾鏡圖元屬性值。<feColorMatrix> 濾鏡對 RGB 顏色和 Alpha 值應用矩陣變換。該屬性是一個 <length> 或 <percentage>。<coordinate> 是使用者座標系中的一個長度,距離使用者座標系原點沿 x 軸的給定距離。如果 x 屬性是百分比值,則屬性值相對於使用者座標系單位中濾鏡區域的寬度。預設值為 0。
值
一個 SVGAnimatedLength 物件。
示例
js
const feColorMatrix = document.querySelector("feColorMatrix");
const leftPosition = feColorMatrix.x;
console.log(leftPosition.baseVal.value); // the `x` value
規範
| 規範 |
|---|
| 濾鏡效果模組第 1 級 # dom-svgfilterprimitivestandardattributes-x |
瀏覽器相容性
載入中…
另見
SVGFEColorMatrixElement.y- CSS
<blend-mode>資料型別 - CSS
mix-blend-mode屬性 - CSS 濾鏡效果
- SVG
<filter>元素,SVG中的 SVGfilter屬性 - 將 SVG 效果應用於 HTML 內容