Propriété CSS word-break
Exemple
Couper les mots à n'importe quel caractère :
p.a {
word-break: break-all;
}
Définition et utilisation
La word-break
propriété spécifie comment les mots doivent être coupés lorsqu'ils atteignent la fin d'une ligne.
Valeur par défaut: | Ordinaire |
---|---|
Hérité: | Oui |
Animable : | non. En savoir plus sur l'animation |
Version: | CSS3 |
Syntaxe JavaScript : | objet .style.wordBreak="casse-tout" |
Prise en charge du navigateur
Les nombres dans le tableau indiquent la première version du navigateur qui prend entièrement en charge la propriété.
Property | |||||
---|---|---|---|---|---|
word-break | 4.0 | 5.5 | 15.0 | 3.1 | 15.0 |
Syntaxe CSS
word-break: normal|break-all|keep-all|break-word|initial|inherit;
Valeurs de propriété
Value | Description |
---|---|
normal | Default value. Uses default line break rules |
break-all | To prevent overflow, word may be broken at any character |
keep-all | Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as value "normal" |
break-word | To prevent overflow, word may be broken at arbitrary points |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |