項 目 | 説 明 |
---|---|
記述形式 | セレクタ {font-variant-caps: 値 } |
値 の形式 | normal,small-caps,all-small-caps,petite-caps,all-petite-caps,unicase,titling-caps |
初 期 値 | normal |
対応ブラウザー | C3+ / e?+ / Fx?+ / Op?+ / Ch?+ / Sa?+ |
適用可能な要素 | すべての要素 |
継 承 | する |
font-variant-capsプロパティ は,スモールキャップス(small caps)などのグリフ(字形) を指定します。
指定できる値の形式は,以下の通りです。
値 | 説 明 |
---|---|
normal | 英小文字は 通常通りの小文字の字形 で表示します。 |
small-caps | 英小文字は スモールキャップスの字形 で表示します。 |
all-small-caps | 英小文字に加えて 英大文字もスモールキャップスの字形 で表示します。 |
petite-caps | 英小文字は プチキャップス(petite caps)の字形 で表示します。 |
all-petite-caps | 英小文字に加えて 英大文字もプチキャップスの字形 で表示します。 |
unicase | 英大文字は スモールキャップスの字形 で,英小文字は 通常通りの小文字の字形 で表示します。 |
titling-caps | 英大文字は タイトル用の大文字(titling-caps) で表示します。 |
備 考 | スモールキャップス(small caps)は,大文字の字体ですが小文字の " x " の高さのフォントです。 詳しくは こちら を参照。 |
HTMLソース | |
---|---|
CSS <head> ~ </head> |
<style type="text/css"> |
HTML <body> ~ </body> |
<span class="samp1">{font-weight: normal; font-variant: normal; font-family: "Times New Roman" ;} のフォント</span><br> <span class="samp2">{font-weight: bold; font-variant: normal; font-family: "Times New Roman" ;} のフォント</span><br> <span class="samp3">{font-weight: normal; font-variant: small-caps; font-family: "Times New Roman" ;} のフォント</span><br> <span class="samp4">{font-weight: bold; font-variant: small-caps; font-family: "Times New Roman" ;} のフォント</span><br> |
ブラウザー 表示例 |
---|
{font-weight: normal; font-variant: normal;
font-family: "Times New Roman" ;} のフォント {font-weight: bold; font-variant: normal; font-family: "Times New Roman" ;} のフォント {font-weight: normal; font-variant: small-caps; font-family: "Times New Roman" ;} のフォント {font-weight: bold; font-variant: small-caps; font-family: "Times New Roman" ;} のフォント |
現状では,このプロパティには未対応のブラウザーも多いので,font-variant プロパティ を用いて指定するほうが無難です。