SVGFESpecularLightingElement: height 属性

Baseline 已广泛支持

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

SVGFESpecularLightingElement 接口的只读属性 height 将 SVG 滤镜图元的垂直尺寸描述为一个 SVGAnimatedLength 对象。

它反映了 <feSpecularLighting> 元素的 height 属性,该元素使用 alpha 通道作为凹凸贴图来照亮源图形。该属性是一个 <length> 或相对于滤镜区域高度的 <percentage>。默认值为 100%。属性值以用户坐标系单位表示长度。

一个 SVGAnimatedLength 对象。

示例

js
const feSpecularLighting = document.querySelector("feSpecularLighting");
const verticalSize = feSpecularLighting.height;
console.log(verticalSize.baseVal.value); // the `height` value

规范

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

浏览器兼容性

另见