SVGFEColorMatrixElement: 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 Juli 2015.
Die width schreibgeschützte Eigenschaft des SVGFEColorMatrixElement-Interfaces beschreibt die horizontale Größe eines SVG-Filterprimitives als SVGAnimatedLength.
Sie spiegelt das <feColorMatrix>-Element width Attribut des Filterprimitives wider. Der <feColorMatrix>-Filter wendet eine Matrixtransformation auf die RGB-Farben und alpha-Werte an. Das Attribut ist ein <length> oder ein <percentage> relativ zur Breite der Filterregion. Der Standardwert ist 100%. Der Eigenschaftswert ist eine Länge in Benutzereinheiten des Koordinatensystems.
Wert
Ein SVGAnimatedLength.
Beispiel
js
const feColorMatrix = document.querySelector("feColorMatrix");
const horizontalSize = feColorMatrix.width;
console.log(horizontalSize.baseVal.value); // the `width` value
Spezifikationen
| Specification |
|---|
| Filter Effects Module Level 1> # dom-svgfilterprimitivestandardattributes-width> |
Browser-Kompatibilität
Siehe auch
SVGFEColorMatrixElement.height- CSS-Datentyp
<blend-mode> - CSS-Eigenschaft
mix-blend-mode - CSS-Filtereffekte
- SVG
<filter>-Element, SVG-Attributfilterin SVG - Anwenden von SVG-Effekten auf HTML-Inhalte