SVGFESpecularLightingElement: x 属性
x 是 SVGFESpecularLightingElement 接口的一个只读属性,它描述了 SVG 滤镜图元的水平坐标位置,类型为 SVGAnimatedLength。
它反映了 <feSpecularLighting> 元素的 x 属性。该元素使用 alpha 通道作为凹凸贴图来照亮源图形。该属性可以是 <length> 或 <percentage>。<coordinate> 是用户坐标系中的一个长度值,表示从用户坐标系原点沿 x 轴方向的给定距离。如果 x 属性是一个百分比值,则属性值相对于用户坐标系中滤镜区域的宽度。默认值为 0。
值
一个 SVGAnimatedLength 对象。
示例
js
const feSpecularLighting = document.querySelector("feSpecularLighting");
const leftPosition = feSpecularLighting.x;
console.log(leftPosition.baseVal.value); // the `x` value
规范
| 规范 |
|---|
| 滤镜效果模块第 1 级 # dom-svgfilterprimitivestandardattributes-x |
浏览器兼容性
加载中…