SVGFEConvolveMatrixElement:width 屬性
width 只讀屬性是 SVGFEConvolveMatrixElement 介面的一部分,它將 SVG 濾鏡原語的水平尺寸描述為 SVGAnimatedLength。
它反映了 <feConvolveMatrix> 元素的 width 濾鏡原語屬性。<feConvolveMatrix> 濾鏡透過組合輸入影像中的畫素與相鄰畫素來應用矩陣卷積效果,產生模糊、邊緣檢測、銳化、浮雕或斜角等卷積效果。該屬性是相對於濾鏡區域寬度的 <length> 或 <percentage>。預設值為 100%。屬性值是以使用者座標系單位表示的長度。
值
一個 SVGAnimatedLength 物件。
示例
js
const feConvolveMatrix = document.querySelector("feConvolveMatrix");
const horizontalSize = feConvolveMatrix.width;
console.log(horizontalSize.baseVal.value); // the `width` value
規範
| 規範 |
|---|
| 濾鏡效果模組第 1 級 # dom-svgfilterprimitivestandardattributes-width |
瀏覽器相容性
載入中…
另見
SVGFEConvolveMatrixElement.height- CSS 濾鏡效果模組
- SVG
<filter>元素,SVG中的 SVGfilter屬性 - 將 SVG 效果應用於 HTML 內容