SVGFEColorMatrixElement: x 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 x schreibgeschützte Eigenschaft des SVGFEColorMatrixElement-Interfaces beschreibt die horizontale Koordinate der Position eines SVG-Filter-Primitives als ein SVGAnimatedLength.
Sie spiegelt den Wert des <feColorMatrix>-Element-Attributs x des Filter-Primitives wider. Der <feColorMatrix>-Filter wendet eine Matrixtransformation auf die RGB-Farb- und Alpha-Werte an. Das Attribut ist ein <length> oder <percentage>. Das <coordinate> ist eine Länge im Benutzerkoordinatensystem, die der gegebenen Entfernung vom Ursprung des Benutzerkoordinatensystems entlang der x-Achse entspricht. Wenn das x-Attribut einen Prozentwert hat, ist der Eigenschaftswert relativ zur Breite des Filterbereichs in Einheiten des Benutzerkoordinatensystems. Der Standardwert ist 0.
Wert
Ein SVGAnimatedLength.
Beispiel
const feColorMatrix = document.querySelector("feColorMatrix");
const leftPosition = feColorMatrix.x;
console.log(leftPosition.baseVal.value); // the `x` value
Spezifikationen
| Specification |
|---|
| Filter Effects Module Level 1> # dom-svgfilterprimitivestandardattributes-x> |
Browser-Kompatibilität
Loading…
Siehe auch
SVGFEColorMatrixElement.y- CSS
<blend-mode>Datentyp - CSS
mix-blend-modeEigenschaft - CSS-Filtereffekte
- SVG
<filter>-Element, SVGfilter-Attribut in SVG - Anwendung von SVG-Effekten auf HTML-Inhalte