SVGFEDiffuseLightingElement: width-Eigenschaft

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Die width-Eigenschaft der SVGFEDiffuseLightingElement-Schnittstelle ist eine schreibgeschützte Eigenschaft, die die horizontale Größe eines SVG-Filter-Primitivs als SVGAnimatedLength beschreibt.

Sie spiegelt das <feDiffuseLighting>-Element-Attribut width des Filter-Primitivs wider. Der Filter beleuchtet ein Bild, indem er den Alpha-Kanal als Bump-Map verwendet. Das Attribut ist ein <length> oder ein <percentage>, das relativ zur Breite der Filter-Region ist. Der Standardwert ist 100%. Der Eigenschaftswert ist eine Länge in Benutzereinheitensystemen.

Wert

Beispiel

js
const feDiffuseLighting = document.querySelector("feDiffuseLighting");
const horizontalSize = feDiffuseLighting.width;
console.log(horizontalSize.baseVal.value); // the `width` value

Spezifikationen

Specification
Filter Effects Module Level 1
# dom-svgfilterprimitivestandardattributes-width

Browser-Kompatibilität

BCD tables only load in the browser

Siehe auch