Dieser Inhalt wurde automatisch aus dem Englischen übersetzt, und kann Fehler enthalten.Erfahre mehr über dieses Experiment.
lighting-color
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.
Das Attributlighting-color definiert die Farbe der Lichtquelle für Beleuchtungsfilter-Primitiven.
Hinweis:Als Präsentationsattribut hatlighting-color auch ein entsprechendes CSS-Property:lighting-color. Wenn beide angegeben sind, hat das CSS-Property Vorrang.
Dieses Attribut kann mit den folgenden SVG-Elementen verwendet werden:
In diesem Artikel
Beispiel
html,body,svg { height: 100%;}html
<svg viewBox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter x="0" y="0" width="100%" height="100%"> <feDiffuseLighting in="SourceGraphic" lighting-color="white"> <fePointLight x="60" y="60" z="20" /> </feDiffuseLighting> </filter> <filter x="0" y="0" width="100%" height="100%"> <feDiffuseLighting in="SourceGraphic" lighting-color="blue"> <fePointLight x="60" y="60" z="20" /> </feDiffuseLighting> </filter> <rect x="0" y="0" width="200" height="200" filter="url(#diffuseLighting1)" /> <rect x="220" y="0" width="200" height="200" filter="url(#diffuseLighting2)" /></svg>Anwendungshinweise
| Wert | color |
|---|---|
| Standardwert | white |
| Animierbar | Ja |
Spezifikationen
| Specification |
|---|
| Filter Effects Module Level 1> # LightingColorProperty> |