From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/css/word-break/index.html | 148 +++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 files/ja/web/css/word-break/index.html (limited to 'files/ja/web/css/word-break') diff --git a/files/ja/web/css/word-break/index.html b/files/ja/web/css/word-break/index.html new file mode 100644 index 0000000000..e2cdd24962 --- /dev/null +++ b/files/ja/web/css/word-break/index.html @@ -0,0 +1,148 @@ +--- +title: word-break +slug: Web/CSS/word-break +tags: + - CSS + - CSS テキスト + - CSS プロパティ + - Reference + - 日本語処理 +translation_of: Web/CSS/word-break +--- +
{{CSSRef}}
+ +

word-breakCSS のプロパティで、改行しなければテキストがコンテンツボックスからあふれる場合に、ブラウザーが改行を挿入するかどうかを指定します。

+ +
{{EmbedInteractiveExample("pages/css/word-break.html")}}
+ + + +

構文

+ +
/* キーワード値 */
+word-break: normal;
+word-break: break-all;
+word-break: keep-all;
+word-break: break-word; /* 非推奨 */
+
+/* グローバル値 */
+word-break: inherit;
+word-break: initial;
+word-break: unset;
+
+ +

word-break プロパティは、下記のリストの中から 1 つを選んで指定します。

+ +

+ +
+
normal
+
既定の改行規則を使用します。
+
break-all
+
CJK (中国語、台湾語、日本語、韓国語) 以外のテキストにおいて、単語中などでの文字の改行に関する禁則処理を解除し、どの文字の間でも改行するようにします。 + +
+
keep-all
+
CJK テキストの改行を許可しません。 CJK 以外のテキストについては normal と同じ挙動となります。
+
break-word {{Deprecated_Inline}}
+
{{cssxref("overflow-wrap")}} プロパティの値とは関係なく、 word-break: normaloverflow-wrap: anywhere と同じ効果になります。
+
+ +
+

メモ: word-break: break-word および overflow-wrap: break-word ({{cssxref("overflow-wrap")}} を参照) とは対照的に、 word-break: break-all はテキストがコンテナーからちょうどあふれたところで (単語全体を次の行に送れば途中で改行を防ぐことができる場合であっても) 位置で改行を生成します。

+
+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

HTML

+ +
<p>1. <code>word-break: normal</code></p>
+<p class="normal narrow">This is a long and
+ Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu
+ グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p>
+
+<p>2. <code>word-break: break-all</code></p>
+<p class="breakAll narrow">This is a long and
+ Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu
+ グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p>
+
+<p>3. <code>word-break: keep-all</code></p>
+<p class="keepAll narrow">This is a long and
+ Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu
+ グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p>
+
+<p>4. <code>word-break: break-word</code></p>
+<p class="breakWord narrow">This is a long and
+  Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu
+ グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉</p>
+ +

CSS

+ +
.narrow {
+  padding: 10px;
+  border: 1px solid;
+  width: 500px;
+  margin: 0 auto;
+  font-size: 20px;
+  line-height: 1.5;
+  letter-spacing: 1px;
+}
+
+.normal {
+  word-break: normal;
+}
+
+.breakAll {
+  word-break: break-all;
+}
+
+.keepAll {
+  word-break: keep-all;
+}
+
+.breakWord {
+  word-break: break-word;
+}
+
+ +

{{EmbedLiveSample('Examples', '100%', 600)}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS3 Text', '#word-break-property', 'word-break')}}{{Spec2('CSS3 Text')}}初回定義
+ +
{{cssinfo}}
+ +

ブラウザーの互換性

+ + + +

{{Compat("css.properties.word-break")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf