Estilo textAlignÚltima propiedad
Ejemplo
Alinear la última línea de un párrafo a la derecha:
document.getElementById("myDIV").style.textAlignLast = "right";
Definición y uso
La propiedad textAlignLast especifica cómo alinear la última línea de un texto.
Nota: La propiedad textAlignLast solo funcionará para elementos con la propiedad text-align establecida en "justificar".
Compatibilidad con navegador
Property | |||||
---|---|---|---|---|---|
textAlignLast | Yes | Yes | Not supported Use MozTextAlignLast |
Yes | Yes |
Nota: los valores "inicio" y "fin" no se admiten en Internet Explorer.
Sintaxis
Devuelve la propiedad textAlignLast:
object.style.textAlignLast
Establezca la propiedad textAlignLast:
object.style.textAlignLast = "auto|left|right|center|justify|start|end|initial|inherit"
Valores de propiedad
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 |
Detalles técnicos
Valor por defecto: | auto |
---|---|
Valor devuelto: | Una cadena, que representa la propiedad text-align-last de un elemento |
Versión CSS | CSS3 |
páginas relacionadas
Referencia CSS: propiedad text-align-last
❮ Objeto de estilo