

プロパティについて
概要
初期値 | “letter-spacing: normal;” |
適用対象 | インライン・ボックスとテキスト |
継承 | Yes |
パーセント値 | フォント・サイズの計算値(“1em”)を“100%”とする |
計算値 | 絶対長もしくはパーセント値 |
アニメーション | 計算値 |
“letter-spacing”プロパティは隣接する文字間の間隔を調整するプロパティです。
“letter-spacing”プロパティを適用する際、連続するアトミック・インライン(置換要素など)は1個の文字のように扱われます。
“letter-spacing”プロパティによる空白は行の先頭には追加されません。
サンプルコード
p { letter-spacing: 1em;}
文字の間隔を調整しない
p {
letter-spacing: normal;
}
彼女は「春はあけぼの。」と記しているが、これは春は朝が一番良い時間であるということを言っているのである。そして「猫は上のかぎり黒くてことはみな白き」とも記していた。つまり彼女はおなかが白くて背中が黒い猫が好きだったのだ。
She wrote "Spring is dawn". This means that the best time in spring is dawn. And also she wrote "A cat is black on the top, and besides that, all white". This means she likes a black cat with a white belly.
كتبت "الربيع هو الفجر". هذا يعني أن أفضل وقت في الربيع هو الفجر. وكتبت أيضًا "قطة سوداء في الأعلى ، وإلى جانب ذلك ، كلها بيضاء". هذا يعني أنها تحب قطة سوداء ذات بطن أبيض.
文字の間隔を長さを指定して調整する
p {
letter-spacing: 0.1em;
}
彼女は「春はあけぼの。」と記しているが、これは春は朝が一番良い時間であるということを言っているのである。そして「猫は上のかぎり黒くてことはみな白き」とも記していた。つまり彼女はおなかが白くて背中が黒い猫が好きだったのだ。
She wrote "Spring is dawn". This means that the best time in spring is dawn. And also she wrote "A cat is black on the top, and besides that, all white". This means she likes a black cat with a white belly.
كتبت "الربيع هو الفجر". هذا يعني أن أفضل وقت في الربيع هو الفجر. وكتبت أيضًا "قطة سوداء في الأعلى ، وإلى جانب ذلك ، كلها بيضاء". هذا يعني أنها تحب قطة سوداء ذات بطن أبيض.
p {
letter-spacing: 1em;
}
彼女は「春はあけぼの。」と記しているが、これは春は朝が一番良い時間であるということを言っているのである。そして「猫は上のかぎり黒くてことはみな白き」とも記していた。つまり彼女はおなかが白くて背中が黒い猫が好きだったのだ。
She wrote "Spring is dawn". This means that the best time in spring is dawn. And also she wrote "A cat is black on the top, and besides that, all white". This means she likes a black cat with a white belly.
كتبت "الربيع هو الفجر". هذا يعني أن أفضل وقت في الربيع هو الفجر. وكتبت أيضًا "قطة سوداء في الأعلى ، وإلى جانب ذلك ، كلها بيضاء". هذا يعني أنها تحب قطة سوداء ذات بطن أبيض.
p {
letter-spacing: 2em;
}
彼女は「春はあけぼの。」と記しているが、これは春は朝が一番良い時間であるということを言っているのである。そして「猫は上のかぎり黒くてことはみな白き」とも記していた。つまり彼女はおなかが白くて背中が黒い猫が好きだったのだ。
She wrote "Spring is dawn". This means that the best time in spring is dawn. And also she wrote "A cat is black on the top, and besides that, all white". This means she likes a black cat with a white belly.
كتبت "الربيع هو الفجر". هذا يعني أن أفضل وقت في الربيع هو الفجر. وكتبت أيضًا "قطة سوداء في الأعلى ، وإلى جانب ذلك ، كلها بيضاء". هذا يعني أنها تحب قطة سوداء ذات بطن أبيض.
p {
letter-spacing: -0.1em;
}
彼女は「春はあけぼの。」と記しているが、これは春は朝が一番良い時間であるということを言っているのである。そして「猫は上のかぎり黒くてことはみな白き」とも記していた。つまり彼女はおなかが白くて背中が黒い猫が好きだったのだ。
She wrote "Spring is dawn". This means that the best time in spring is dawn. And also she wrote "A cat is black on the top, and besides that, all white". This means she likes a black cat with a white belly.
كتبت "الربيع هو الفجر". هذا يعني أن أفضل وقت في الربيع هو الفجر. وكتبت أيضًا "قطة سوداء في الأعلى ، وإلى جانب ذلك ، كلها بيضاء". هذا يعني أنها تحب قطة سوداء ذات بطن أبيض.
文字の間隔をパーセント値を指定して調整する
p {
letter-spacing: 50%;
}
彼女は「春はあけぼの。」と記しているが、これは春は朝が一番良い時間であるということを言っているのである。そして「猫は上のかぎり黒くてことはみな白き」とも記していた。つまり彼女はおなかが白くて背中が黒い猫が好きだったのだ。
She wrote "Spring is dawn". This means that the best time in spring is dawn. And also she wrote "A cat is black on the top, and besides that, all white". This means she likes a black cat with a white belly.
كتبت "الربيع هو الفجر". هذا يعني أن أفضل وقت في الربيع هو الفجر. وكتبت أيضًا "قطة سوداء في الأعلى ، وإلى جانب ذلك ، كلها بيضاء". هذا يعني أنها تحب قطة سوداء ذات بطن أبيض.
p {
letter-spacing: 100%;
}
彼女は「春はあけぼの。」と記しているが、これは春は朝が一番良い時間であるということを言っているのである。そして「猫は上のかぎり黒くてことはみな白き」とも記していた。つまり彼女はおなかが白くて背中が黒い猫が好きだったのだ。
She wrote "Spring is dawn". This means that the best time in spring is dawn. And also she wrote "A cat is black on the top, and besides that, all white". This means she likes a black cat with a white belly.
كتبت "الربيع هو الفجر". هذا يعني أن أفضل وقت في الربيع هو الفجر. وكتبت أيضًا "قطة سوداء في الأعلى ، وإلى جانب ذلك ، كلها بيضاء". هذا يعني أنها تحب قطة سوداء ذات بطن أبيض.
p {
letter-spacing: 200%;
}
彼女は「春はあけぼの。」と記しているが、これは春は朝が一番良い時間であるということを言っているのである。そして「猫は上のかぎり黒くてことはみな白き」とも記していた。つまり彼女はおなかが白くて背中が黒い猫が好きだったのだ。
She wrote "Spring is dawn". This means that the best time in spring is dawn. And also she wrote "A cat is black on the top, and besides that, all white". This means she likes a black cat with a white belly.
كتبت "الربيع هو الفجر". هذا يعني أن أفضل وقت في الربيع هو الفجر. وكتبت أيضًا "قطة سوداء في الأعلى ، وإلى جانب ذلك ، كلها بيضاء". هذا يعني أنها تحب قطة سوداء ذات بطن أبيض.
p {
letter-spacing: -10%;
}
彼女は「春はあけぼの。」と記しているが、これは春は朝が一番良い時間であるということを言っているのである。そして「猫は上のかぎり黒くてことはみな白き」とも記していた。つまり彼女はおなかが白くて背中が黒い猫が好きだったのだ。
She wrote "Spring is dawn". This means that the best time in spring is dawn. And also she wrote "A cat is black on the top, and besides that, all white". This means she likes a black cat with a white belly.
كتبت "الربيع هو الفجر". هذا يعني أن أفضل وقت في الربيع هو الفجر. وكتبت أيضًا "قطة سوداء في الأعلى ، وإلى جانب ذلك ، كلها بيضاء". هذا يعني أنها تحب قطة سوداء ذات بطن أبيض.