CSS font-style property
Examples
Three paragraphs set different font styles:
p.normal {font-style:normal}
p.italic {font-style:italic}
p.oblique {font-style:oblique}
p.italic {font-style:italic}
p.oblique {font-style:oblique}
try it"
Attribute definitions and instructions
font-style property to specify the text font style.
Defaults: | normal |
---|---|
inherit: | yes |
version: | CSS1 |
JavaScript syntax: | object .style.fontStyle = "italic" |
Browser Support
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
font-style | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Property Value
value | description |
---|---|
normal | Defaults. The browser displays a standard font style. |
italic | The browser displays a italic font style. |
oblique | The browser displays a slanted font style. |
inherit | Provisions should inherit the font style from the parent element. |
related articles
CSS tutorial: CSS the Font
CSS Reference: font properties