font-style

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Das font-style-Attribut gibt an, ob der Text mit einer normalen, kursiven oder schrägen Schriftart dargestellt werden soll.

Hinweis: Als Präsentationsattribut hat font-style auch ein entsprechendes CSS-Property: font-style. Wenn beide angegeben sind, hat die CSS-Eigenschaft Vorrang.

Sie können dieses Attribut mit den folgenden SVG-Elementen verwenden:

Beispiel

html
<svg viewBox="0 0 250 30" xmlns="http://www.w3.org/2000/svg">
  <text y="20" font-style="normal">Normal font style</text>
  <text x="150" y="20" font-style="italic">Italic font style</text>
</svg>

Hinweise zur Verwendung

Wert normal | italic | oblique
Standardwert normal
Animierbar Ja

Für eine Beschreibung der Werte lesen Sie bitte die CSS font-style-Eigenschaft.

Spezifikationen

Specification
CSS Fonts Module Level 4
# font-style-prop

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
font-style

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
See implementation notes.

Siehe auch