Eigenschap in CSS -lettertype
Voorbeeld
Stel verschillende letterstijlen in voor drie alinea's:
p.a {
font-style: normal;
}
p.b {
font-style: italic;
}
p.c {
font-style: oblique;
}
Definitie en gebruik
De font-style
eigenschap specificeert de tekenstijl voor een tekst.
Standaardwaarde: | normaal |
---|---|
geërfd: | Ja |
Animeerbaar: | Nee. Lees over animeren |
Versie: | CSS1 |
JavaScript-syntaxis: | object .style.fontStyle="italic" |
Browserondersteuning
De getallen in de tabel geven de eerste browserversie aan die de eigenschap volledig ondersteunt.
Property | |||||
---|---|---|---|---|---|
font-style | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
CSS-syntaxis
font-style: normal|italic|oblique|initial|inherit;
Eigendomswaarden
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 |
Gerelateerde pagina's
CSS-zelfstudie: CSS-lettertype
CSS-referentie: eigenschap font
HTML DOM-referentie: eigenschap fontStyle