Propriété de retour à la ligne CSS
Exemple
Autoriser les mots longs à pouvoir se casser et passer à la ligne suivante :
div {
word-wrap: break-word;
}
Définition et utilisation
La word-wrap
propriété permet aux longs mots de pouvoir être coupés et renvoyés à la ligne suivante.
Valeur par défaut: | Ordinaire |
---|---|
Hérité: | Oui |
Animable : | non. En savoir plus sur l'animation |
Version: | CSS3 |
Syntaxe JavaScript : | objet .style.wordWrap="break-word" |
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-wrap | 4.0 | 5.5 | 3.5 | 3.1 | 10.5 |
Syntaxe CSS
word-wrap: normal|break-word|initial|inherit;
Valeurs de propriété
Value | Description |
---|---|
normal | Break words only at allowed break points. This is default |
break-word | Allows unbreakable words to be broken |
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 : Effets de texte CSS