aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/hanging-punctuation/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/hanging-punctuation/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/css/hanging-punctuation/index.html')
-rw-r--r--files/zh-cn/web/css/hanging-punctuation/index.html99
1 files changed, 99 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/hanging-punctuation/index.html b/files/zh-cn/web/css/hanging-punctuation/index.html
new file mode 100644
index 0000000000..b7d28f226f
--- /dev/null
+++ b/files/zh-cn/web/css/hanging-punctuation/index.html
@@ -0,0 +1,99 @@
+---
+title: hanging-punctuation
+slug: Web/CSS/hanging-punctuation
+tags:
+ - css css属性 css文本
+translation_of: Web/CSS/hanging-punctuation
+---
+<div>{{cssref}}</div>
+
+<div><strong><code>hanging-punctuation </code></strong>CSS属性指定了标点符号应该放在文本句子的开头还是结尾。悬挂标点符号可能被放在线框外。</div>
+
+<div></div>
+
+<pre class="brush:css no-line-numbers notranslate">/* Keyword values */
+hanging-punctuation: none;
+hanging-punctuation: first;
+hanging-punctuation: last;
+hanging-punctuation: force-end;
+hanging-punctuation: allow-end;
+
+/* Two keywords */
+hanging-punctuation: first force-end;
+hanging-punctuation: first allow-end;
+hanging-punctuation: first last;
+hanging-punctuation: last force-end;
+hanging-punctuation: last allow-end;
+
+/* Three keywords */
+hanging-punctuation: first force-end last;
+hanging-punctuation: first allow-end last;
+
+/* Global values */
+hanging-punctuation: inherit;
+hanging-punctuation: initial;
+hanging-punctuation: unset;
+</pre>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="语法">语法</h2>
+
+<p>这个属性可被指定多个值,可以是一个值,也可以是两个值,或者是三个值。</p>
+
+<ul>
+ <li>一个值 语法:在下面列表中的任意一个值。</li>
+ <li>两个值 语法:
+ <ul>
+ <li>或者与以下任何一个一起使用,并以它们结尾:last,allow-end或force-end</li>
+ <li>或者与以下任何一个一起使用,并以它们开头:first,allow-end或force-end。</li>
+ </ul>
+ </li>
+ <li>三个值 语法:
+ <ul>
+ <li>或者<code>first</code>, <code>allow-end</code>, 和<code>last</code></li>
+ <li>或者 <code>first</code>, <code>force-end</code>, 和 <code>last</code>.</li>
+ </ul>
+ </li>
+</ul>
+
+<h3 id="取值">取值</h3>
+
+<dl>
+ <dt><code>none</code></dt>
+ <dd>无悬挂字符。</dd>
+ <dt><code>first</code></dt>
+ <dd>显示元素的第一个格式化行开头的括号或引号。</dd>
+ <dt><code>last</code></dt>
+ <dd>显示元素的最后一个格式化行结尾的括号或引号。</dd>
+ <dt><code>force-end</code></dt>
+ <dd>显示行结尾处的句号或逗号。</dd>
+ <dt><code>allow-end</code></dt>
+ <dd>如果预先没有其它适合的来适应的,则在行尾显示句号或逗号。</dd>
+</dl>
+
+<h3 id="正式语法">正式语法</h3>
+
+<pre class="syntaxbox notranslate">{{csssyntax}}</pre>
+
+<h2 id="示例">示例</h2>
+
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush: html notranslate">&lt;p&gt;“Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur dignissim nunc mauris, et sollicitudin est scelerisque sed. Praesent laoreet tortor massa, sit amet vulputate nulla pharetra ut.”&lt;/p&gt;</pre>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush: css notranslate">p {
+ hanging-punctuation: first;
+ margin: .5rem;
+}</pre>
+
+<h3 id="Result">Result</h3>
+
+<h2 id="Specifications">Specifications</h2>
+
+<ul>
+ <li><a href="https://www.w3.org/TR/css-text-3/#hanging-punctuation-property">CSS Text Module Level 3 (Working Draft, 10-Oct-2013)</a></li>
+ <li><a href="https://drafts.csswg.org/css-text-3/#hanging-punctuation-property">CSS Text Module Level 3 (Editor’s Draft, 03-May-2017)</a></li>
+</ul>