Stile textAlignLast Property
Esempio
Allinea l'ultima riga di un pragraph a destra:
document.getElementById("myDIV").style.textAlignLast = "right";
Definizione e utilizzo
La proprietà textAlignLast specifica come allineare l'ultima riga di un testo.
Nota: la proprietà textAlignLast funzionerà solo per gli elementi con la proprietà text-align impostata su "justify".
Supporto browser
Property | |||||
---|---|---|---|---|---|
textAlignLast | Yes | Yes | Not supported Use MozTextAlignLast |
Yes | Yes |
Nota: i valori "inizio" e "fine" non sono supportati in Internet Explorer.
Sintassi
Restituisce la proprietà textAlignLast:
object.style.textAlignLast
Imposta la proprietà textAlignLast:
object.style.textAlignLast = "auto|left|right|center|justify|start|end|initial|inherit"
Valori di proprietà
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 |
Dettagli tecnici
Valore di default: | auto |
---|---|
Valore di ritorno: | Una stringa, che rappresenta la proprietà text-align-last di un elemento |
Versione CSS | CSS3 |
Pagine correlate
Riferimento CSS: proprietà text-align-last
❮ Oggetto stile