Propriété de style de police CSS
Exemple
Définissez différents styles de police pour trois paragraphes :
p.a {
font-style: normal;
}
p.b {
font-style: italic;
}
p.c {
font-style: oblique;
}
Définition et utilisation
La font-style
propriété spécifie le style de police d'un texte.
Valeur par défaut: | Ordinaire |
---|---|
Hérité: | Oui |
Animable : | non. En savoir plus sur l'animation |
Version: | CSS1 |
Syntaxe JavaScript : | objet .style.fontStyle="italique" |
Prise en charge du navigateur
Les nombres dans le tableau indiquent la première version du navigateur qui prend entièrement en charge la propriété.
Property | |||||
---|---|---|---|---|---|
font-style | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Syntaxe CSS
font-style: normal|italic|oblique|initial|inherit;
Valeurs de propriété
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 |
Pages connexes
Tutoriel CSS : Police CSS
Référence CSS : propriété de la police
Référence HTML DOM : propriété fontStyle