SVGFEComponentTransferElement: x 属性
SVGFEComponentTransferElement 接口的只读属性 x,它将 SVG 滤镜图元的水平坐标描述为一个 SVGAnimatedLength 对象。
它反映了 <feComponentTransfer> 元素的 x 滤镜图元属性值。该属性是一个 <length> 或 <percentage>。<coordinate> 是用户坐标系中的一个长度,表示从用户坐标系原点沿 x 轴的给定距离。如果 x 属性是百分比值,则属性值相对于用户坐标系单位的滤镜区域的宽度而言。
值
一个 SVGAnimatedLength 对象。
示例
js
const feComponentTransfer = document.querySelector("feComponentTransfer");
const leftPosition = feComponentTransfer.x;
console.log(leftPosition.baseVal.value); // the `x` value
规范
| 规范 |
|---|
| 滤镜效果模块第 1 级 # dom-svgfilterprimitivestandardattributes-x |
浏览器兼容性
加载中…