--- title: hanging-punctuation slug: Web/CSS/hanging-punctuation tags: - CSS - Experimental - Propriété - Reference translation_of: Web/CSS/hanging-punctuation ---
La propriété hanging-punctuation indique si un signe de ponctuation se situant au début ou à la fin d'une ligne de texte doit rester sur cette ligne, quitte à sortir de la boîte qui représente la ligne.
/* Valeurs avec un mot-clé */ hanging-punctuation: none; hanging-punctuation: first; hanging-punctuation: last; hanging-punctuation: force-end; hanging-punctuation: allow-end; /* Valeurs avec deux mots-clés */ hanging-punctuation: first force-end; hanging-punctuation: first allow-end; hanging-punctuation: first last; hanging-punctuation: last force-end; hanging-punctuation: last allow-end; /* Valeurs avec trois mots-clés */ hanging-punctuation: first force-end last; hanging-punctuation: first allow-end last; /* Valeurs globales */ hanging-punctuation: inherit; hanging-punctuation: initial; hanging-punctuation: unset;
Cette propriété peut être définie grâce à une, deux ou trois valeurs :
first avec un des mots-clés parmi : last, allow-end ou force-endlast avec un des mots-clés parmi : last, allow-end ou force-endfirst, allow-end et lastfirst, force-end et lastnonefirstlastforce-endallow-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. Proin ornare commodo sodales. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
p {
hanging-punctuation: first;
margin: .5rem;
}
{{EmbedLiveSample('Exemple')}}
| Spécification | État | Commentaires |
|---|---|---|
| {{SpecName('CSS3 Text', '#hanging-punctuation-property', 'hanging-punctuation')}} | {{Spec2('CSS3 Text')}} | Définition initiale. |
{{cssinfo}}
{{Compat("css.properties.hanging-punctuation")}}