CSSワードラッププロパティ
例
長い単語を分割して次の行に折り返すことができるようにします。
div {
word-wrap: break-word;
}
定義と使用法
このword-wrap
プロパティを使用すると、長い単語を分割して次の行に折り返すことができます。
デフォルト値: | 正常 |
---|---|
遺伝性の: | はい |
アニメート可能: | 番号。アニメート可能について読む |
バージョン: | CSS3 |
JavaScript構文: | オブジェクト.style.wordWrap = "break-word" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
word-wrap | 4.0 | 5.5 | 3.5 | 3.1 | 10.5 |
CSS構文
word-wrap: normal|break-word|initial|inherit;
プロパティ値
Value | Description |
---|---|
normal | Break words only at allowed break points. This is default |
break-word | Allows unbreakable words to be broken |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
関連ページ
CSSチュートリアル:CSSテキスト効果