SVGFEDisplacementMapElement: y 属性
y 是 SVGFEDisplacementMapElement 接口的一个只读属性,它描述了 SVG 滤镜原语的位置的垂直坐标,其类型为 SVGAnimatedLength。
它反映了 <feDisplacementMap> 元素的 y 滤镜原语属性值。该属性是一个 <length> 或 <percentage>。<coordinate> 是用户坐标系中的一个长度,表示从滤镜的起点沿 y 轴的距离。如果 y 属性是百分比值,则属性值相对于用户坐标系中滤镜区域的高度而言。
值
一个 SVGAnimatedLength 对象。
示例
js
const feDisplacementMap = document.querySelector("feDisplacementMap");
const topPosition = feDisplacementMap.y;
console.log(topPosition.baseVal.value); // the `y` value
规范
| 规范 |
|---|
| 滤镜效果模块第 1 级 # dom-svgfilterprimitivestandardattributes-y |
浏览器兼容性
加载中…
另见
SVGFEDisplacementMapElement.xSVGFEImageElementAPI 和<feImage>元素SVGFETurbulenceElementAPI 和<feTurbulence>元素- CSS
<blend-mode>数据类型 - CSS
mix-blend-mode属性