WEBページ作成リファレンス
cman.jp cman.jp > WEBページ作成TOP > CSSリファレンス > 「斜体のスタイル」

font-style 「フォントの斜体を指定」

font-styleは、使用するフォントの斜体を指定することができます。

使用するフォントの種類や表示するブラウザにより見栄えが変わり場合があります。

CSS Ver.適用要素継承
2.1
3.0で拡張
全てする
広告

font-style の値

【構文】

font-style : 値;
font-style [フォントの斜体を指定]
font-style: normal; 標準のフォントを使用する
font-style: italic; 斜体のフォントを使用する
適用されているフォントに斜体がない場合は、標準の文字を斜体に変換して使用する
font-style: oblique; ブラウザにより表示は異なる
Chrome : 適用されているフォントの標準体を斜体に変換して使用する
IE,Firefox : 上記「italic」と同じ
"oblique"はブラウザによりことなり、実質"italic"のみ指定が使用されている
ページTOP

font-style のサンプル


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>font-style指定サンプル</title>
<style type="text/css">
.s1{
    font-family: "Times New Roman";  /* イタリック体を持っているフォント */
    font-style: 20pt;
}
.s2{
    font-family: "MS Gothic";        /* イタリック体を持っていないフォント */
    font-style: 20pt;
}
</style>
</head>
<body>
<div>イタリック体を持っているフォント:"Times New Roman"</div>
<div class="s1" style="font-style: normal">abcdefg123__normal</div>
<div class="s1" style="font-style: italic">abcdefg123__italic</div>
<div class="s1" style="font-style: oblique">abcdefg123__oblique</div>
<br>
<div>イタリック体を持っていないフォント:"MS ゴシック"</div>
<div class="s2" style="font-style: normal">abcdefg123__normal</div>
<div class="s2" style="font-style: italic">abcdefg123__italic</div>
<div class="s2" style="font-style: oblique">abcdefg123__oblique</div>
</body>
</html>
ページTOP

関連するCSSプロパティ

fontフォント情報をまとめて指定
font-variantフォントをスモールキャップ(英小文字の表示方法)を指定
font-weightフォントの太さを指定
font-styleフォントのサイズを指定
font-familyフォントの種類を指定
line-height1行の高さを指定
@font-faceWebフォントの利用
ページTOP
広告
QrCode
このページのURL
スマートフォン・タブレット運営 : CMAN 株式会社シーマン