Style textAlignLast Property
Exemple
Alignez la dernière ligne d'un pragraphe à droite :
document.getElementById("myDIV").style.textAlignLast = "right";
Définition et utilisation
La propriété textAlignLast spécifie comment aligner la dernière ligne d'un texte.
Remarque : La propriété textAlignLast ne fonctionnera que pour les éléments dont la propriété text-align est définie sur "justify".
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
textAlignLast | Yes | Yes | Not supported Use MozTextAlignLast |
Yes | Yes |
Remarque : Les valeurs "début" et "fin" ne sont pas prises en charge dans Internet Explorer.
Syntaxe
Renvoyez la propriété textAlignLast :
object.style.textAlignLast
Définissez la propriété textAlignLast :
object.style.textAlignLast = "auto|left|right|center|justify|start|end|initial|inherit"
Valeurs de propriété
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 |
Détails techniques
Valeur par défaut: | auto |
---|---|
Valeur de retour : | Une chaîne, représentant la propriété text-align-last d'un élément |
Version CSS | CSS3 |
Pages connexes
Référence CSS : propriété text-align-last
❮ Objet de style