Kiểu văn bảnAlignLast Thuộc tính
Ví dụ
Căn chỉnh dòng cuối cùng của một đoạn pragraph ở bên phải:
document.getElementById("myDIV").style.textAlignLast = "right";
Hãy tự mình thử »Sự miêu tả
Thuộc tính textAlignLast chỉ định cách căn chỉnh dòng cuối cùng của văn bản.
Lưu ý: Thuộc tính textAlignLast sẽ chỉ hoạt động đối với các thành phần có thuộc tính text-align được đặt thành "justify".
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
textAlignLast | Yes | Yes | Not supported Use MozTextAlignLast |
Yes | Yes |
Cú pháp
Trả về thuộc tính textAlignLast:
object .style.textAlignLast
Đặt thuộc tính textAlignLast:
object .style.textAlignLast = "auto|left|right|center|justify|start|end|initial|inherit"
Giá trị tài sản
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 |
Chi tiết kỹ thuật
Giá trị mặc định: | tự động |
---|---|
Giá trị trả về: | Một Chuỗi, biểu thị thuộc tính text-align-last của một phần tử |
Phiên bản CSS | CSS3 |
Trang liên quan
Tham chiếu CSS: thuộc tính text-align-last