word-break

  • 版本网址缩略名: CSS/word-break
  • 版本标题: word-break
  • 版本 id: 436443
  • 创建于:
  • 创建者: yan
  • 是否是当前版本?
  • 评论

修订内容

{{CSSRef}}

Summary

 word-break 指定怎样在单词内断行。

{{cssbox("word-break")}}

Syntax

Formal syntax: {{csssyntax("word-break")}}
word-break: normal 
word-break: break-all 
word-break: keep-all

word-break: inherit

Value

normal
使用默认的断行规则。
break-all
对于non-CJK (Chinese/Japanese/Korean) 文本,可在单词任意字符间断行。
keep-all
CJK 文本不断行。 Non-CJK 文本表现同 normal

Examples

{{todo}}

Specifications

Specification Status Comment
{{SpecName('CSS3 Text', '#word-break', 'word-break')}} {{Spec2('CSS3 Text')}}  

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 {{CompatGeckoDesktop("15.0")}} 5.5 {{CompatNo}} {{CompatVersionUnknown}}
keep-all {{unimplemented_inline_webkit("43917")}} {{CompatGeckoDesktop("15.0")}} 5.5 {{CompatNo}} {{unimplemented_inline_webkit("43917")}}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} 18.0 {{CompatGeckoMobile("15.0")}} {{CompatUnknown}} {{CompatNo}} {{CompatUnknown}}
keep-all {{unimplemented_inline_webkit("43917")}} {{unimplemented_inline_webkit("43917")}} {{CompatGeckoMobile("15.0")}} {{CompatUnknown}} {{CompatNo}} {{unimplemented_inline_webkit("43917")}}
  • IE8 introduced -ms-word-break as a synonym for word-break. Don't use the -ms- prefix.

See also

  • {{CSS_Reference:Text}}

修订版来源

<div>
  {{CSSRef}}</div>
<h2 id="Summary">Summary</h2>
<p>&nbsp;<code>word-break</code> 指定怎样在单词内断行。</p>
<div>
  {{cssbox("word-break")}}</div>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("word-break")}}
</pre>
<pre>
word-break: normal 
word-break: break-all 
word-break: keep-all

word-break: inherit
</pre>
<h3 id="Value">Value</h3>
<dl>
  <dt>
    <code>normal</code></dt>
  <dd>
    使用默认的断行规则。</dd>
  <dt>
    <code>break-all</code></dt>
  <dd>
    对于non-CJK (Chinese/Japanese/Korean) 文本,可在单词任意字符间断行。</dd>
  <dt>
    <code>keep-all</code></dt>
  <dd>
    CJK 文本不断行。 Non-CJK 文本表现同 <code>normal</code>。</dd>
</dl>
<h2 id="Examples">Examples</h2>
<p>{{todo}}</p>
<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', '#word-break', 'word-break')}}</td>
      <td>{{Spec2('CSS3 Text')}}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<div>
  {{CompatibilityTable}}</div>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{CompatGeckoDesktop("15.0")}}</td>
        <td>5.5</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
      <tr>
        <td><code>keep-all</code></td>
        <td>{{unimplemented_inline_webkit("43917")}}</td>
        <td>{{CompatGeckoDesktop("15.0")}}</td>
        <td>5.5</td>
        <td>{{CompatNo}}</td>
        <td>{{unimplemented_inline_webkit("43917")}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Chrome for Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>18.0</td>
        <td>{{CompatGeckoMobile("15.0")}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
      <tr>
        <td><code>keep-all</code></td>
        <td>{{unimplemented_inline_webkit("43917")}}</td>
        <td>{{unimplemented_inline_webkit("43917")}}</td>
        <td>{{CompatGeckoMobile("15.0")}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatNo}}</td>
        <td>{{unimplemented_inline_webkit("43917")}}</td>
      </tr>
    </tbody>
  </table>
</div>
<ul>
  <li>IE8 introduced<code> -ms-word-break </code>as a synonym for<code> word-break</code>. Don't use the <code>-ms-</code> prefix.</li>
</ul>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{CSS_Reference:Text}}</li>
</ul>
恢复到这个版本