CSS overflow-wrap Property
Przykład
Pozwól przeglądarce łamać wiersze z długimi słowami, jeśli przepełnią kontener:
div {
overflow-wrap: break-word;
}
Definicja i użycie
Właściwość overflow-wrap
określa, czy przeglądarka może łamać wiersze z długimi słowami, jeśli przepełnią one kontener.
Domyślna wartość: | normalna |
---|---|
Dziedziczny: | tak |
Animowalny: | nie. Przeczytaj o animacji |
Wersja: | CSS3 |
Składnia JavaScript: | obiekt .style.overflowWrap="normalny" |
Obsługa przeglądarki
Liczby w tabeli określają pierwszą wersję przeglądarki, która w pełni obsługuje tę właściwość.
Property | |||||
---|---|---|---|---|---|
overflow-wrap | 23.0 | 18.0 | 49.0 | 6.1 | 12.1 |
Składnia CSS
overflow-wrap: normal|anywhere|break-word|initial|inherit;
Wartości nieruchomości
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 |
Powiązane strony
Samouczek CSS: Przepełnienie CSS