CSS font-style- Eigenschaft
Beispiel
Legen Sie unterschiedliche Schriftstile für drei Absätze fest:
p.a {
font-style: normal;
}
p.b {
font-style: italic;
}
p.c {
font-style: oblique;
}
Definition und Verwendung
Die font-style
Eigenschaft legt den Schriftstil für einen Text fest.
Standardwert: | normal |
---|---|
Vererbt: | ja |
Animierbar: | Nein. Lesen Sie mehr über animierbare |
Ausführung: | CSS1 |
JavaScript-Syntax: | Objekt .style.fontStyle="kursiv" |
Browser-Unterstützung
Die Zahlen in der Tabelle geben die erste Browserversion an, die die Eigenschaft vollständig unterstützt.
Property | |||||
---|---|---|---|---|---|
font-style | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
CSS-Syntax
font-style: normal|italic|oblique|initial|inherit;
Eigenschaftswerte
Value | Description | Play it |
---|---|---|
normal | The browser displays a normal font style. This is default | |
italic | The browser displays an italic font style | |
oblique | The browser displays an oblique font style | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Verwandte Seiten
CSS-Tutorial: CSS-Schriftart
CSS-Referenz: font-Eigenschaft
HTML-DOM-Referenz: fontStyle-Eigenschaft