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