CSSの単語間隔プロパティ
例
<p>要素の単語間のスペースを30ピクセルにするように指定します。
p
{
word-spacing: 30px;
}
定義と使用法
プロパティはword-spacing
、単語間の空白を増減します。
注: 負の値を使用できます。
デフォルト値: | 正常 |
---|---|
遺伝性の: | はい |
アニメート可能: | はい。アニメート可能について読む |
バージョン: | CSS1 |
JavaScript構文: | object .style.wordSpacing = "20px" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
word-spacing | 1.0 | 6.0 | 1.0 | 1.0 | 3.5 |
CSS構文
word-spacing: normal|length|initial|inherit;
プロパティ値
Value | Description | Play it |
---|---|---|
normal | Defines normal space between words (0.25em) . This is default | |
length | Defines an additional space between words (in px, pt, cm, em, etc). Negative values are allowed. Read about length units | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
関連ページ
CSSチュートリアル:CSSテキスト
HTML DOMリファレンス: wordSpacingプロパティ