Свойство стиля textAlignLast
Пример
Выровняйте последнюю строку праграфа вправо:
document.getElementById("myDIV").style.textAlignLast = "right";
Определение и использование
Свойство textAlignLast указывает, как выравнивать последнюю строку текста.
Примечание. Свойство textAlignLast будет работать только для элементов со свойством text-align, установленным на «выравнивание».
Поддержка браузера
Property | |||||
---|---|---|---|---|---|
textAlignLast | Yes | Yes | Not supported Use MozTextAlignLast |
Yes | Yes |
Примечание . Значения «начало» и «конец» не поддерживаются в Internet Explorer.
Синтаксис
Вернуть свойство textAlignLast:
object.style.textAlignLast
Установите свойство textAlignLast:
object.style.textAlignLast = "auto|left|right|center|justify|start|end|initial|inherit"
Значения свойств
Value | Description |
---|---|
auto | Default value. The last line is justified and aligned left |
left | The last line is aligned to the left |
right | The last line is aligned to the right |
center | The last line is center-aligned |
justify | The last line is justified as the rest of the lines |
start | The last line is aligned at the beginning of the line (left if the text-direction is left-to-right, and right is the text-direction is right-to-left) |
end | The last line is aligned at the end of the line (right if the text-direction is left-to-right, and left is the text-direction is right-to-left) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Технические детали
Значение по умолчанию: | авто |
---|---|
Возвращаемое значение: | Строка, представляющая свойство text-align-last элемента |
CSS-версия | CSS3 |
Связанные страницы
Справочник по CSS: свойство text-align-last
❮ Объект стиля