stop-color
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
Das stop-color
-Attribut gibt an, welche Farbe an einem Verlaufspunkt verwendet werden soll.
Hinweis:
Im Hinblick auf Verläufe behandelt SVG das Schlüsselwort transparent
anders als CSS. SVG berechnet Verläufe nicht im vormultiplizierten Farbraum, daher bedeutet transparent
tatsächlich transparentes Schwarz. Das Festlegen eines stop-color
-Wertes auf transparent
entspricht dem Festlegen eines stop-color
-Wertes auf black
und eines stop-opacity
-Wertes auf 0
.
Hinweis:
Als Präsentationsattribut besitzt stop-color
auch ein entsprechendes CSS-Eigenschafts-Pendant: stop-color
. Wenn beide angegeben sind, hat die CSS-Eigenschaft Vorrang.
Dieses Attribut kann mit den folgenden SVG-Elementen verwendet werden:
Hinweise zur Verwendung
Spezifikationen
Specification |
---|
Scalable Vector Graphics (SVG) 2 # StopColorProperty |
Browser-Kompatibilität
BCD tables only load in the browser
Siehe auch
- CSS
stop-color
-Eigenschaft stop-opacity