--- title: hanging-punctuation slug: Web/CSS/hanging-punctuation tags: - css css属性 css文本 translation_of: Web/CSS/hanging-punctuation ---
hanging-punctuation
CSS属性指定了标点符号应该放在文本句子的开头还是结尾。悬挂标点符号可能被放在线框外。/* 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;
{{cssinfo}}
这个属性可被指定多个值,可以是一个值,也可以是两个值,或者是三个值。
first
, allow-end
, 和last
first
, force-end
, 和 last
.none
first
last
force-end
allow-end
{{csssyntax}}
<p>“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.”</p>
p { hanging-punctuation: first; margin: .5rem; }