Styl tekstuAlignLast Property
Przykład
Wyrównaj ostatni wiersz akapitu do prawej:
document.getElementById("myDIV").style.textAlignLast = "right";
Definicja i użycie
Właściwość textAlignLast określa sposób wyrównania ostatniego wiersza tekstu.
Uwaga: Właściwość textAlignLast działa tylko w przypadku elementów z właściwością text-align ustawioną na „justify”.
Obsługa przeglądarki
Property | |||||
---|---|---|---|---|---|
textAlignLast | Yes | Yes | Not supported Use MozTextAlignLast |
Yes | Yes |
Uwaga: wartości „start” i „end” nie są obsługiwane w przeglądarce Internet Explorer.
Składnia
Zwróć właściwość textAlignLast:
object.style.textAlignLast
Ustaw właściwość textAlignLast:
object.style.textAlignLast = "auto|left|right|center|justify|start|end|initial|inherit"
Wartości nieruchomości
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 |
Szczegóły techniczne
Domyślna wartość: | automatyczny |
---|---|
Wartość zwrotu: | String, reprezentujący właściwość text-align-last elementu |
Wersja CSS | CSS3 |
Powiązane strony
Odniesienie CSS: text-align-last property
❮ Obiekt stylu