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 |
瀏覽器相容性
載入中…