font-family
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 font-family Attribut gibt an, welche Schriftfamilie verwendet wird, um den Text darzustellen. Es wird als eine priorisierte Liste von Schriftfamiliennamen und/oder generischen Familiennamen spezifiziert.
Hinweis:
Als Präsentationsattribut hat font-family auch ein entsprechendes CSS-Attribut: font-family. Wenn beide angegeben sind, hat die CSS-Eigenschaft Vorrang.
Sie können dieses Attribut mit den folgenden SVG-Elementen verwenden:
Beispiele
>SVG-Schriftfamilie kontrollieren
html
<svg viewBox="0 0 200 30" xmlns="http://www.w3.org/2000/svg">
<text y="20" font-family="Arial, Helvetica, sans-serif">Sans serif</text>
<text x="100" y="20" font-family="monospace">Monospace</text>
</svg>
Nutzungshinweise
| Wert | Siehe font-family |
|---|---|
| Standardwert | Hängt vom Benutzeragenten ab |
| Animierbar | Ja |
Für eine Beschreibung der Werte, lesen Sie bitte die CSS font-family Eigenschaft.
Spezifikationen
| Specification |
|---|
| CSS Fonts Module Level 4> # generic-font-families> |
| CSS Fonts Module Level 4> # font-family-prop> |
Browser-Kompatibilität
Loading…
Siehe auch
- CSS
font-familyEigenschaft