スタイルwordWrapプロパティ
例
長い単語を分割して次の行に折り返すことができるようにします。
document.getElementById("myDIV").style.wordWrap = "break-word";
定義と使用法
wordWrapプロパティを使用すると、長い単語を分割して次の行に折り返すことができます。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
wordWrap | Yes | Yes | Yes | Yes | Yes |
構文
wordWrapプロパティを返します。
object.style.wordWrap
wordWrapプロパティを設定します。
object.style.wordWrap = "normal|break-word|initial|inherit"
プロパティ値
Value | Description |
---|---|
normal | Break words only at allowed break points |
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バージョン | CSS3 |
関連ページ
CSSリファレンス:ワードラッププロパティ
❮スタイルオブジェクト