Proprietà stile carattere CSS
Esempio
Imposta stili di carattere diversi per tre paragrafi:
p.a {
font-style: normal;
}
p.b {
font-style: italic;
}
p.c {
font-style: oblique;
}
Definizione e utilizzo
La font-style
proprietà specifica lo stile del carattere per un testo.
Valore di default: | normale |
---|---|
Ereditato: | sì |
Animabile: | no. Leggi su animabile |
Versione: | CSS1 |
sintassi JavaScript: | oggetto .style.fontStyle="italic" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
font-style | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Sintassi CSS
font-style: normal|italic|oblique|initial|inherit;
Valori di proprietà
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 |
Pagine correlate
Tutorial CSS: Font CSS
Riferimento CSS: proprietà del carattere
Riferimento HTML DOM: proprietà fontStyle