aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/css/line-break/index.html
blob: f7e073e1008a504940f543d3ce4e275f60e40f7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
title: line-break
slug: Web/CSS/line-break
translation_of: Web/CSS/line-break
---
<div>{{CSSRef}}</div>

<p><strong><code>line-break</code></strong> CSS 屬性能夠設定在中文、日文和韓文(CJK) 的文字中,遇到標點或符號時該如何斷行。</p>

<pre class="brush:css no-line-numbers">/* Keyword values */
line-break: auto;
line-break: loose;
line-break: normal;
line-break: strict;
line-break: anywhere;

/* Global values */
line-break: inherit;
line-break: initial;
line-break: unset;
</pre>

<div>{{cssinfo}}</div>

<h2 id="Syntax">Syntax</h2>

<h3 id="Values">Values</h3>

<dl>
 <dt><code>auto</code></dt>
 <dd>以預設的斷行規則斷開文字。</dd>
 <dt><code>loose</code></dt>
 <dd>Break text using the least restrictive line break rule. Typically used for short lines, such as in newspapers.</dd>
 <dt><code>normal</code></dt>
 <dd>Break text using the most common line break rule.</dd>
 <dt><code>strict</code></dt>
 <dd>Break text using the most stringent line break rule.</dd>
 <dt><code>anywhere</code> </dt>
 <dd>
 <p>There is a soft wrap opportunity around every typographic character unit, including around any punctuation character or preserved white spaces, or in the middle of words, disregarding any prohibition against line breaks, even those introduced by characters with the GL, WJ, or ZWJ character class or mandated by the word-break property. The different wrapping opportunities must not be prioritized. Hyphenation is not applied.</p>
 </dd>
</dl>

<h3 id="Formal_syntax">Formal syntax</h3>

<pre class="syntaxbox">{{csssyntax}}</pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Text', '#line-break-property', 'line-break')}}</td>
   <td>{{Spec2('CSS3 Text')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>



<p>{{Compat("css.properties.line-break")}}</p>