Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. SVG
  3. Reference
  4. Attributes
  5. color

Dieser Inhalt wurde automatisch aus dem Englischen übersetzt, und kann Fehler enthalten.Erfahre mehr über dieses Experiment.

View in EnglishAlways switch to English

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.

Dascolor Attribut wird verwendet, um einen potenziellen indirekten Wert,currentColor, für die Attributefill,stroke,stop-color,flood-color undlighting-color bereitzustellen.

Hinweis:Als Präsentationsattribut hatcolor auch ein entsprechendes CSS-Eigenschaftsgegenstück:color. Wenn beide angegeben sind, hat die CSS-Eigenschaft Vorrang.

Technisch gesehen kanncolor auf jedes Element angewendet werden, aber es hat keine direkte Auswirkung auf SVG-Elemente.

Verwendungshinweise

Wert<color> |inherit
StandardwertHängt vom Benutzeragenten ab
AnimierbarJa

Beispiel

html,body,svg {  height: 100%;}
html
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">  <g color="green">    <rect width="50" height="50" fill="currentColor" />    <circle      r="25"      cx="70"      cy="70"      stroke="currentColor"      fill="none"      stroke-width="5" />  </g></svg>

Spezifikationen

Specification
CSS Color Module Level 4
# the-color-property
Scalable Vector Graphics (SVG) 2
# ColorProperty

Browser-Kompatibilität

Siehe auch

Help improve MDN

Learn how to contribute Diese Seite wurde automatisch aus dem Englischen übersetzt.

[8]ページ先頭

©2009-2026 Movatter.jp