SVGFEOffsetElement: width 屬性
SVGFEOffsetElement 介面的只讀屬性 width,描述了 SVG 濾鏡圖元的水平尺寸,其型別為 SVGAnimatedLength。
它反映了 <feOffset> 元素的 width 屬性,該屬性用於相對於其當前位置偏移輸入影像。該屬性是一個 <length> 或 <percentage>,相對於濾鏡區域的寬度。預設值為 100%。屬性值是以使用者座標系單位表示的長度。
值
一個 SVGAnimatedLength 物件。
示例
js
const feOffset = document.querySelector("feOffset");
const horizontalSize = feOffset.width;
console.log(horizontalSize.baseVal.value); // the `width` value
規範
| 規範 |
|---|
| 濾鏡效果模組第 1 級 # dom-svgfilterprimitivestandardattributes-width |
瀏覽器相容性
載入中…