1. Home
  2. スタイルシート CSS
  3. テキスト・フォント
  4. イタリック体にする

イタリック体にする


font-style: ***;

ブラウザ
IE
Fx
Sf
Cr
O
特性
font-style

font-style は、フォントのスタイル(イタリック体と斜体)を指定するプロパティです。



.example {
font-style: italic;
}


プロパティ名 説明
font-style normal 標準 (初期値)
italic イタリック体にする
oblique 斜体にする

【参考】

次のように指定すると、イタリック体で表示される文字(em要素 等)を標準のスタイルにすることができます。

em { font-style: normal; }


使用例


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>文書のタイトル</title>

<style type="text/css">

p.example1 { font-style: italic; }
p.example2 { font-style: oblique; }

</style>

</head>
<body>

<p>標準のスタイル</p>
<p class="example1">italic を指定した文字</p>
<p class="example2">oblique を指定した文字</p>

</body>
</html>

表示例

標準のスタイル

italic を指定した文字

oblique を指定した文字


テキスト・フォント

ページの先頭へ


inserted by FC2 system