--- title: hanging-punctuation slug: Web/CSS/hanging-punctuation tags: - CSS - CSS Property - CSS Text - CSS テキスト - CSS プロパティ - Experimental - Reference - リファレンス translation_of: Web/CSS/hanging-punctuation ---
hanging-punctuation は CSS のプロパティで、区切り記号をテキストの行頭や行末にぶら下げるべきかどうかを指定します。ぶら下げられる区切り記号は行ボックスの外側に配置されれることがあります。
/* キーワード値 */ hanging-punctuation: none; hanging-punctuation: first; hanging-punctuation: last; hanging-punctuation: force-end; hanging-punctuation: allow-end; /* 2 つのキーワード */ hanging-punctuation: first force-end; hanging-punctuation: first allow-end; hanging-punctuation: first last; hanging-punctuation: last force-end; hanging-punctuation: last allow-end; /* 3 つのキーワード */ hanging-punctuation: first force-end last; hanging-punctuation: first allow-end last; /* グローバル値 */ hanging-punctuation: inherit; hanging-punctuation: initial; hanging-punctuation: unset;
{{CSSInfo}}
hanging-punctuation プロパティは 1 つ、2 つ、 3 つの値で指定することができます。
first と併せて、last, allow-end, force-end のいずれかlast と併せて、first, allow-end, force-end のいずれかfirst, allow-end, lastfirst, force-end, lastnonefirstlastforce-endallow-end<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 last;
margin: .5rem;
}
{{EmbedLiveSample("Example")}}
| 仕様書 | 状態 | 備考 |
|---|---|---|
| {{SpecName("CSS3 Text", "#hanging-punctuation-property", "hanging-punctuation")}} | {{Spec2("CSS3 Text")}} | 初回定義 |
{{Compat("css.properties.hanging-punctuation")}}