5. html - css - font-size フォントサイズ
- 5.1 概要
- 5.2 実験
5.1 概要
フォントサイズは font-size で指定します。
指定の仕方は、サイズをきっちり指定する方法や small、large などのキーワードで指定する方法があります。
/* <absolute-size> 値 */
font-size: xx-small;
font-size: x-small;
font-size: small;
font-size: medium;
font-size: large;
font-size: x-large;
font-size: xx-large;
/* <relative-size> 値 */
font-size: larger;
font-size: smaller;
/* <length> 値 */
font-size: 12px;
font-size: 0.8em;
/* <percentage> 値 */
font-size: 80%;
/* グローバル値 */
font-size: inherit;
font-size: initial;
font-size: unset;
なのだそうであります。
5.2 実験
で、small、large などの値を実験してみます。
font-size: xx-small; 日本語で書くとこう。
font-size: x-small; 日本語で書くとこう。
font-size: small; 日本語で書くとこう。
font-size: medium; 日本語で書くとこう。
わたしの感覚では medium が以外に大きいんですよね。
font-size: large; 日本語で書くとこう。
font-size: x-large; 日本語で書くとこう。
font-size: xx-large; 日本語で書くとこう。
|
|