Dieser Inhalt wurde automatisch aus dem Englischen übersetzt, und kann Fehler enthalten.Erfahre mehr über dieses Experiment.
font-synthesis-small-caps
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since März 2023.
Diefont-synthesis-small-capsCSS Eigenschaft ermöglicht es Ihnen, festzulegen, ob der Browser einen Small-Caps-Schriftgrad synthetisieren darf, wenn dieser in einer Schriftfamilie fehlt. Small-Caps-Glyphen verwenden typischerweise die Form von Großbuchstaben, sind jedoch auf die Größe von Kleinbuchstaben reduziert.
Es ist oft praktisch, die Kurzschreibweiseigenschaftfont-synthesis zu verwenden, um alle Schriftgrad-Synthesewerte zu steuern.
In diesem Artikel
Syntax
/* Keyword values */font-synthesis-small-caps: auto;font-synthesis-small-caps: none;/* Global values */font-synthesis-small-caps: inherit;font-synthesis-small-caps: initial;font-synthesis-small-caps: revert;font-synthesis-small-caps: revert-layer;font-synthesis-small-caps: unset;Werte
Formale Definition
| Anfangswert | auto |
|---|---|
| Anwendbar auf | all elements and text. Auch anwendbar auf::first-letter und::first-line. |
| Vererbt | Ja |
| Berechneter Wert | wie angegeben |
| Animationstyp | diskret |
Formale Syntax
font-synthesis-small-caps =
auto|
none
Beispiele
>Deaktivieren der Synthese von Small-Caps-Schriftgrad
Dieses Beispiel zeigt, wie die Synthese des Small-Caps-Schriftgrads durch den Browser bei der SchriftMontserrat deaktiviert wird.
HTML
<p> These are the default <span>small-caps</span>, <strong>bold</strong>, and <em>oblique</em> typefaces.</p><p> The <span>small-caps</span> typeface is turned off here but not the <strong>bold</strong> and <em>oblique</em> typefaces.</p>CSS
@import "https://fonts.googleapis.com/css2?family=Montserrat&display=swap";.english { font-family: "Montserrat", sans-serif;}.small-caps { font-variant: small-caps;}.no-syn { font-synthesis-small-caps: none;}Ergebnis
Spezifikationen
| Specification |
|---|
| CSS Fonts Module Level 4> # font-synthesis-small-caps> |