SVGFEImageElement: width 属性
SVGFEImageElement
接口的只读属性 width
将 SVG 滤镜原语的水平尺寸描述为 SVGAnimatedLength
。
它反映了 <feImage>
元素的 width
属性,该属性从外部源获取图像数据并输出像素数据。该属性是相对于滤镜区域宽度的 <length>
或 <percentage>
。默认值为 100%
。属性值是以用户坐标系单位表示的长度。
值
一个 SVGAnimatedLength
对象。
示例
js
const feImage = document.querySelector("feImage");
const horizontalSize = feImage.width;
console.log(horizontalSize.baseVal.value); // the `width` value
规范
规范 |
---|
滤镜效果模块第 1 级 # dom-svgfilterprimitivestandardattributes-width |
浏览器兼容性
加载中…
另见
SVGFEImageElement.height
- SVG 教程:滤镜效果
- SVG 滤镜基元属性
- CSS
<blend-mode>
数据类型 - CSS
mix-blend-mode
属性