SVGFEColorMatrixElement: width 屬性
SVGFEColorMatrixElement 介面的只讀屬性 width 使用 SVGAnimatedLength 來描述 SVG 濾鏡圖元的水平尺寸。
它反映了 <feColorMatrix> 元素的 width 濾鏡圖元屬性。 <feColorMatrix> 濾鏡會對 RGB 顏色和 alpha 值應用矩陣變換。該屬性是相對於濾鏡區域寬度的 length 或 percentage。 預設值為 100%。屬性值是以使用者座標系單位表示的長度。
值
一個 SVGAnimatedLength 物件。
示例
js
const feColorMatrix = document.querySelector("feColorMatrix");
const horizontalSize = feColorMatrix.width;
console.log(horizontalSize.baseVal.value); // the `width` value
規範
| 規範 |
|---|
| 濾鏡效果模組第 1 級 # dom-svgfilterprimitivestandardattributes-width |
瀏覽器相容性
載入中…
另見
SVGFEColorMatrixElement.height- CSS
<blend-mode>資料型別 - CSS
mix-blend-mode屬性 - CSS 濾鏡效果
- SVG
<filter>元素,SVG中的 SVGfilter屬性 - 將 SVG 效果應用於 HTML 內容