Propriedade de quebra de palavras CSS
Exemplo
Quebre palavras em qualquer caractere:
p.a {
word-break: break-all;
}
Definição e uso
A word-break
propriedade especifica como as palavras devem ser quebradas ao chegar ao final de uma linha.
Valor padrão: | normal |
---|---|
Herdado: | sim |
Animavel: | não. Leia sobre animáveis |
Versão: | CSS3 |
Sintaxe JavaScript: | objeto .style.wordBreak="break-all" |
Suporte ao navegador
Os números na tabela especificam a primeira versão do navegador que oferece suporte total à propriedade.
Property | |||||
---|---|---|---|---|---|
word-break | 4.0 | 5.5 | 15.0 | 3.1 | 15.0 |
Sintaxe CSS
word-break: normal|break-all|keep-all|break-word|initial|inherit;
Valores de propriedade
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 |