CSSフォントスタイルのプロパティ
例
3つの段落に異なるフォントスタイルを設定します。
p.a {
font-style: normal;
}
p.b {
font-style: italic;
}
p.c {
font-style: oblique;
}
定義と使用法
このfont-style
プロパティは、テキストのフォントスタイルを指定します。
デフォルト値: | 正常 |
---|---|
遺伝性の: | はい |
アニメート可能: | 番号。アニメート可能について読む |
バージョン: | CSS1 |
JavaScript構文: | オブジェクト.style.fontStyle = "italic" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
font-style | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
CSS構文
font-style: normal|italic|oblique|initial|inherit;
プロパティ値
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 |
関連ページ
CSSチュートリアル:CSSフォント
CSSリファレンス:フォントプロパティ
HTML DOMリファレンス:fontStyleプロパティ