スタイルtextAlignLastプロパティ
例
プラグラフの最後の行を右に揃えます。
document.getElementById("myDIV").style.textAlignLast = "right";
定義と使用法
textAlignLastプロパティは、テキストの最後の行を整列する方法を指定します。
注: textAlignLastプロパティは、text-alignプロパティが「justify」に設定されている要素に対してのみ機能します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
textAlignLast | Yes | Yes | Not supported Use MozTextAlignLast |
Yes | Yes |
注:値「start」および「end」は、InternetExplorerではサポートされていません。
構文
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プロパティ
❮スタイルオブジェクト