Style textAlignLast Thuộc tính
Thí dụ
Căn chỉnh dòng cuối cùng của bài ca ngợi về bên phải:
document.getElementById("myDIV").style.textAlignLast = "right";
Định nghĩa và Cách sử dụng
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 phần tử 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 |
Lưu ý: Các giá trị "bắt đầu" và "kết thúc" không được hỗ trợ trong Internet Explorer.
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ả lại: | Một chuỗi, đại diện cho thuộc tính text-align-last của một phần tử |
Phiên bản CSS | CSS3 |
Các trang liên quan
Tham chiếu CSS: thuộc tính text-align-last
❮ Đối tượng phong cách