SVGFECompositeElement: x 属性
SVGFECompositeElement
接口的只读属性 x
描述了 SVG 滤镜图元的水平坐标,其类型为 SVGAnimatedLength
。
它反映了 <feComposite>
元素的 x
滤镜图元属性值。<feComposite>
SVG 滤镜图元使用 Porter-Duff 合成操作组合两个输入图像。该属性是一个 <length>
或 <percentage>
。<coordinate>
是用户坐标系中的一个长度,它位于用户坐标系的原点沿 x 轴的方向上,距离原点给定的距离。如果 x
属性的值是百分比,则属性值相对于用户坐标系单位中的滤镜区域的宽度。默认值为 0
。
值
一个 SVGAnimatedLength
对象。
示例
js
const feComposite = document.querySelector("feComposite");
const leftPosition = feComposite.x;
console.log(leftPosition.baseVal.value); // the `x` value
规范
规范 |
---|
滤镜效果模块第 1 级 # dom-svgfilterprimitivestandardattributes-x |
浏览器兼容性
加载中…
另见
SVGFECompositeElement.y
- CSS
<blend-mode>
数据类型 - CSS
mix-blend-mode
属性