CSS word-break Свойство
Пример
Разбить слова на любой символ:
p.a {
word-break: break-all;
}
Определение и использование
Свойство word-break
указывает, как слова должны прерываться при достижении конца строки.
Значение по умолчанию: | normal |
---|---|
Inherited: | yes |
Animatable: | no. Читайте о animatable |
Version: | CSS3 |
Синтаксис JavaScript: | object.style.wordBreak="break-all" |
Поддержка браузера
Номера в таблице указывают первую версию браузера, которая полностью поддерживает свойство.
Свойство | |||||
---|---|---|---|---|---|
word-break | 4.0 | 5.5 | 15.0 | 3.1 | 15.0 |
Синтаксис CSS
word-break: normal|break-all|keep-all|initial|inherit;
Значения свойств
Значение | Описание |
---|---|
normal | Значение по умолчанию. Использует правила разрыва строк по умолчанию |
break-all | Чтобы предотвратить переполнение, Word может быть разбита на любой символ |
keep-all | Разрывы слов не должны использоваться для китайского/японского/корейского (CJK) текста. Поведение текста non-CJK такое же как значение «нормальный» |
break-word | Чтобы предотвратить переполнение, Word может быть разбита на произвольные точки |
initial | Присваивает этому свойству значение по умолчанию. (Читайте о initial) |
inherit | Наследует это свойство из родительского элемента. (Читайте о inherit) |