Propriété CSS overflow-wrap
Exemple
Laissez le navigateur être autorisé à couper les lignes avec de longs mots, s'ils débordent du conteneur :
div {
overflow-wrap: break-word;
}
Définition et utilisation
La overflow-wrap
propriété spécifie si le navigateur peut ou non couper les lignes avec des mots longs, s'ils débordent du conteneur.
Valeur par défaut: | Ordinaire |
---|---|
Hérité: | Oui |
Animable : | non. En savoir plus sur l'animation |
Version: | CSS3 |
Syntaxe JavaScript : | objet .style.overflowWrap="normal" |
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 | |||||
---|---|---|---|---|---|
overflow-wrap | 23.0 | 18.0 | 49.0 | 6.1 | 12.1 |
Syntaxe CSS
overflow-wrap: normal|anywhere|break-word|initial|inherit;
Valeurs de propriété
Value | Description | Play it |
---|---|---|
normal | Long words will not break, even if they overflow the container. This is default | |
anywhere | Long words will break if they overflow the container | |
break-word | Long words will break if they overflow the container | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Pages connexes
Tutoriel CSS : débordement CSS