Vlastnost CSS overflow-wrap
Příklad
Nechte prohlížeč dělit řádky dlouhými slovy, pokud přetečou kontejner:
div {
overflow-wrap: break-word;
}
Definice a použití
Tato overflow-wrap
vlastnost určuje, zda prohlížeč může či nemůže dělit řádky dlouhými slovy, pokud přetečou kontejner.
Výchozí hodnota: | normální |
---|---|
Zděděno: | Ano |
Animovatelné: | Ne. Přečtěte si o tématu Animable |
Verze: | CSS3 |
Syntaxe JavaScriptu: | objekt .style.overflowWrap="normal" |
Podpora prohlížeče
Čísla v tabulce určují první verzi prohlížeče, která plně podporuje vlastnost.
Property | |||||
---|---|---|---|---|---|
overflow-wrap | 23.0 | 18.0 | 49.0 | 6.1 | 12.1 |
Syntaxe CSS
overflow-wrap: normal|anywhere|break-word|initial|inherit;
Hodnoty vlastností
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 |
Související stránky
CSS tutoriál: CSS Overflow