SVGFEComponentTransferElement: y 属性

Baseline 已广泛支持

此特性已相当成熟,可在许多设备和浏览器版本上使用。自 ⁨2015 年 7 月⁩以来,各浏览器均已提供此特性。

SVGFEComponentTransferElement 接口的只读属性 y,将其描述为 SVG 滤镜图元的垂直坐标,其类型为 SVGAnimatedLength

它反映了 <feComponentTransfer> 元素的 y 滤镜图元属性值。该属性是一个 <length><percentage>

<coordinate> 是用户坐标系中的一个长度,表示距离滤镜原点在 y 轴上的距离。如果 y 属性是一个百分比值,则属性值相对于用户坐标系中的滤镜区域高度。默认值为 0

一个 SVGAnimatedLength 对象。

示例

js
const feComponentTransfer = document.querySelector("feComponentTransfer");
const topPosition = feComponentTransfer.y;
console.log(topPosition.baseVal.value); // the `y` value

规范

规范
滤镜效果模块第 1 级
# dom-svgfilterprimitivestandardattributes-y

浏览器兼容性

另见